Skip to content

Commit

Permalink
chore(mocha-config-devtools): bump jsdom to 22, global-jsdom to 9 (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
gribnoysup authored Oct 30, 2023
1 parent 984a2d9 commit 48901f5
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 132 deletions.
8 changes: 8 additions & 0 deletions configs/mocha-config-devtools/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import assert from 'assert';

describe('mocha-config-devtools/base', function () {
it('can run a ts file', function () {
// This file will just not run if ts-node is not set up correctly
assert(true);
});
});
18 changes: 12 additions & 6 deletions configs/mocha-config-devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
"description": "Shared mocha mocha configuration for Devtools packages",
"license": "SSPL",
"main": "index.js",
"devDependencies": {
"@mongodb-js/prettier-config-devtools": "^1.0.0",
"prettier": "^2.3.2"
},
"scripts": {
"prettier": "prettier",
"lint": "npm run prettier -- --check .",
"test": "mocha --config ./index.js index.test.ts && mocha --config ./react.js react.test.ts",
"test-ci": "npm run test",
"check": "npm run lint",
"check-ci": "npm run lint",
"reformat": "npm run prettier -- --write ."
Expand All @@ -23,15 +21,23 @@
"publishConfig": {
"access": "public"
},
"devDependencies": {
"@mongodb-js/prettier-config-devtools": "^1.0.0",
"prettier": "^2.3.2",
"react": ">=16"
},
"peerDependencies": {
"react": ">=16"
},
"dependencies": {
"@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
"chai": "^4.3.4",
"chai-dom": "^1.9.0",
"chai-enzyme": "^1.0.0-beta.1",
"enzyme": "^3.11.0",
"global-jsdom": "^8.3.0",
"jsdom": "^21.1.0",
"global-jsdom": "^9.1.0",
"identity-obj-proxy": "^3.0.0",
"jsdom": "^22.1.0",
"react-16-node-hanging-test-fix": "^1.0.0",
"sinon-chai": "^3.7.0",
"ts-node": "^10.9.1",
Expand Down
10 changes: 10 additions & 0 deletions configs/mocha-config-devtools/react.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import assert from 'assert';

describe('mocha-config-devtools/react', function () {
it('has jsdom', function () {
assert(!!globalThis.window);
assert(!!globalThis.document);
document.body.appendChild(document.createTextNode('Hello world!'));
assert(document.body.innerHTML === 'Hello world!');
});
});
174 changes: 48 additions & 126 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 48901f5

Please sign in to comment.