blob: 367dfea036ce77ebb5b5e97a18142372313dbc07 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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')
})
})
})
|