Skip to content

Commit

Permalink
test(environment-jsdom): add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvelSQ committed Oct 12, 2021
1 parent 4b9f45b commit ae8958b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions e2e/custom-jsdom-html/__tests__/test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
test('jsdom custom html', async () => {
expect(document.getElementById('root')).toBeTruthy();
});
5 changes: 5 additions & 0 deletions e2e/custom-jsdom-html/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
preset: [['@babel/env', {
targets: 'current'
}]]
}
13 changes: 13 additions & 0 deletions e2e/custom-jsdom-html/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"dependencies": {
"@babel/core": "^7.2.2",
"@babel/preset-env": "^7.2.2"
},
"jest": {
"testEnvironment": "jsdom",
"testEnvironmentOptions": {
"html": "<div id=\"root\"></div>"
}
}
}

0 comments on commit ae8958b

Please sign in to comment.