diff options
author | syn <isaqtm@gmail.com> | 2019-12-23 22:58:41 +0300 |
---|---|---|
committer | syn <isaqtm@gmail.com> | 2019-12-23 22:58:41 +0300 |
commit | eca1edf0943aa1531f41542508fa8504c96bc491 (patch) | |
tree | f6ef1e11705fcedafcf9db58c332691b1f9f761d /tests | |
download | fcked-rt-eca1edf0943aa1531f41542508fa8504c96bc491.tar.gz |
Initial commit from nwb v0.23.0
Diffstat (limited to 'tests')
-rw-r--r-- | tests/.eslintrc | 5 | ||||
-rw-r--r-- | tests/App-test.js | 23 |
2 files changed, 28 insertions, 0 deletions
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(<App/>, node, () => { + expect(node.textContent).toContain('Welcome to React') + }) + }) +}) |