Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from streamich/fix-tests
fix: π simplify AfterDraf component
- Loading branch information
Showing
4 changed files
with
23 additions
and
108 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,16 @@ | ||
/** @jest-environment node */ | ||
import {createElement as h} from 'react'; | ||
import ReactDOMServer from 'react-dom/server'; | ||
import {AfterDraf} from '..'; | ||
|
||
require('./index.test'); | ||
const sleep = (time) => new Promise((resolve) => setTimeout(resolve, time)); | ||
|
||
describe('<AfterDraf>', () => { | ||
it('Renders children', async () => { | ||
const str = ReactDOMServer.renderToStaticMarkup(<AfterDraf> | ||
<div>foobar</div> | ||
</AfterDraf>); | ||
|
||
expect(str).toBe('<div>foobar</div>'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d34ac4f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Build version:
2.0.1-master.71
π€master
on Travis π