Skip to content

Commit ae8958b

Browse files
committed
test(environment-jsdom): add test case
1 parent 4b9f45b commit ae8958b

3 files changed

Lines changed: 21 additions & 0 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
test('jsdom custom html', async () => {
2+
expect(document.getElementById('root')).toBeTruthy();
3+
});
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
preset: [['@babel/env', {
3+
targets: 'current'
4+
}]]
5+
}

e2e/custom-jsdom-html/package.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"dependencies": {
3+
"@babel/core": "^7.2.2",
4+
"@babel/preset-env": "^7.2.2"
5+
},
6+
"jest": {
7+
"testEnvironment": "jsdom",
8+
"testEnvironmentOptions": {
9+
"html": "<div id=\"root\"></div>"
10+
}
11+
}
12+
}
13+

0 commit comments

Comments
 (0)