From eca1edf0943aa1531f41542508fa8504c96bc491 Mon Sep 17 00:00:00 2001 From: syn Date: Mon, 23 Dec 2019 22:58:41 +0300 Subject: Initial commit from nwb v0.23.0 --- tests/.eslintrc | 5 +++++ tests/App-test.js | 23 +++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 tests/.eslintrc create mode 100644 tests/App-test.js (limited to 'tests') diff --git a/tests/.eslintrc b/tests/.eslintrc new file mode 100644 index 0000000..7eeefc3 --- /dev/null +++ b/tests/.eslintrc @@ -0,0 +1,5 @@ +{ + "env": { + "mocha": true + } +} diff --git a/tests/App-test.js b/tests/App-test.js new file mode 100644 index 0000000..367dfea --- /dev/null +++ b/tests/App-test.js @@ -0,0 +1,23 @@ +import expect from 'expect' +import React from 'react' +import {render, unmountComponentAtNode} from 'react-dom' + +import App from 'src/App' + +describe('App component', () => { + let node + + beforeEach(() => { + node = document.createElement('div') + }) + + afterEach(() => { + unmountComponentAtNode(node) + }) + + it('displays a welcome message', () => { + render(, node, () => { + expect(node.textContent).toContain('Welcome to React') + }) + }) +}) -- cgit v1.2.1-18-gbd029