Commit 4f1adf0a authored by Alejandro Celaya's avatar Alejandro Celaya Committed by Alejandro Celaya

Update to chai 5 and remove karma-chai and karma-sinon

parent 4da8b920
......@@ -44,7 +44,7 @@
"babel-plugin-istanbul": "^6.0.0",
"babel-plugin-mockable-imports": "^2.0.1",
"babel-plugin-transform-async-to-promises": "^0.8.6",
"chai": "^4.1.2",
"chai": "^5.0.0",
"chance": "^1.0.13",
"classnames": "^2.2.4",
"commander": "^11.0.0",
......@@ -69,12 +69,10 @@
"gulp-changed": "^5.0.1",
"hammerjs": "^2.0.4",
"karma": "^6.0.1",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^3.1.0",
"karma-coverage-istanbul-reporter": "^3.0.2",
"karma-mocha": "^2.0.0",
"karma-mocha-reporter": "^2.0.4",
"karma-sinon": "^1.0.5",
"karma-source-map-support": "^1.4.0",
"katex": "^0.16.0",
"lodash.debounce": "^4.0.3",
......
......@@ -8,7 +8,7 @@ module.exports = function (config) {
// Base path that will be used to resolve all patterns (eg. files, exclude)
basePath: './',
frameworks: ['mocha', 'chai', 'sinon', 'source-map-support'],
frameworks: ['mocha', 'source-map-support'],
files: [
// Empty HTML file to assist with some tests
......
import { assert } from 'chai';
import { configure } from 'enzyme';
import { Adapter } from 'enzyme-adapter-preact-pure';
import 'preact/debug';
import sinon from 'sinon';
import { patch } from '../../test-util/assert-methods';
// Expose the sinon assertions.
// Expose the sinon assertions and add extra assert methods.
sinon.assert.expose(assert, { prefix: null });
// Add extra assert methods
patch(assert);
// Expose these globally, to avoid dependency on outdated karma-chai and
// karma-sinon plugins
globalThis.assert = assert;
globalThis.sinon = sinon;
// Configure Enzyme for UI tests.
configure({ adapter: new Adapter() });
......
......@@ -3889,10 +3889,10 @@ __metadata:
languageName: node
linkType: hard
"assertion-error@npm:^1.1.0":
version: 1.1.0
resolution: "assertion-error@npm:1.1.0"
checksum: fd9429d3a3d4fd61782eb3962ae76b6d08aa7383123fca0596020013b3ebd6647891a85b05ce821c47d1471ed1271f00b0545cf6a4326cf2fc91efcc3b0fbecf
"assertion-error@npm:^2.0.1":
version: 2.0.1
resolution: "assertion-error@npm:2.0.1"
checksum: a0789dd882211b87116e81e2648ccb7f60340b34f19877dd020b39ebb4714e475eb943e14ba3e22201c221ef6645b7bfe10297e76b6ac95b48a9898c1211ce66
languageName: node
linkType: hard
......@@ -4559,18 +4559,16 @@ __metadata:
languageName: node
linkType: hard
"chai@npm:^4.1.2":
version: 4.3.10
resolution: "chai@npm:4.3.10"
"chai@npm:^5.0.0":
version: 5.0.0
resolution: "chai@npm:5.0.0"
dependencies:
assertion-error: ^1.1.0
check-error: ^1.0.3
deep-eql: ^4.1.3
get-func-name: ^2.0.2
loupe: ^2.3.6
pathval: ^1.1.1
type-detect: ^4.0.8
checksum: 536668c60a0d985a0fbd94418028e388d243a925d7c5e858c7443e334753511614a3b6a124bac9ca077dfc4c37acc367d62f8c294960f440749536dc181dfc6d
assertion-error: ^2.0.1
check-error: ^2.0.0
deep-eql: ^5.0.1
loupe: ^3.0.0
pathval: ^2.0.0
checksum: f81ca1830f918a0d377de151c076a8d138929a886cdd4d0a7e3c4ab2f8f0869fc92f43430e6e75460539de9a2abe48cdc4d4fb73fc67e24f53c23a0b01875ca8
languageName: node
linkType: hard
......@@ -4616,12 +4614,10 @@ __metadata:
languageName: node
linkType: hard
"check-error@npm:^1.0.3":
version: 1.0.3
resolution: "check-error@npm:1.0.3"
dependencies:
get-func-name: ^2.0.2
checksum: e2131025cf059b21080f4813e55b3c480419256914601750b0fee3bd9b2b8315b531e551ef12560419b8b6d92a3636511322752b1ce905703239e7cc451b6399
"check-error@npm:^2.0.0":
version: 2.0.0
resolution: "check-error@npm:2.0.0"
checksum: 120f252c2e1ad82ef82a616662805345c6c361347bfd6203f8a28c53a158811dd0ea21278f29c8136cc9df12fc7f077d1a07124569d98fb396b3072d08f2f092
languageName: node
linkType: hard
......@@ -5174,12 +5170,10 @@ __metadata:
languageName: node
linkType: hard
"deep-eql@npm:^4.1.3":
version: 4.1.3
resolution: "deep-eql@npm:4.1.3"
dependencies:
type-detect: ^4.0.0
checksum: 7f6d30cb41c713973dc07eaadded848b2ab0b835e518a88b91bea72f34e08c4c71d167a722a6f302d3a6108f05afd8e6d7650689a84d5d29ec7fe6220420397f
"deep-eql@npm:^5.0.1":
version: 5.0.1
resolution: "deep-eql@npm:5.0.1"
checksum: 8009e8a8bf3e0f591a122e7788e304a2bed1299b7774f039be96f9ef35c00fb254292fb1568952651aea0c1d1eb23d0bca484bbdd2cf4fcee685c6f2c43670f3
languageName: node
linkType: hard
......@@ -7063,7 +7057,7 @@ __metadata:
languageName: node
linkType: hard
"get-func-name@npm:^2.0.0, get-func-name@npm:^2.0.2":
"get-func-name@npm:^2.0.1":
version: 2.0.2
resolution: "get-func-name@npm:2.0.2"
checksum: 3f62f4c23647de9d46e6f76d2b3eafe58933a9b3830c60669e4180d6c601ce1b4aa310ba8366143f55e52b139f992087a9f0647274e8745621fa2af7e0acf13b
......@@ -7825,7 +7819,7 @@ __metadata:
babel-plugin-istanbul: ^6.0.0
babel-plugin-mockable-imports: ^2.0.1
babel-plugin-transform-async-to-promises: ^0.8.6
chai: ^4.1.2
chai: ^5.0.0
chance: ^1.0.13
classnames: ^2.2.4
commander: ^11.0.0
......@@ -7850,12 +7844,10 @@ __metadata:
gulp-changed: ^5.0.1
hammerjs: ^2.0.4
karma: ^6.0.1
karma-chai: ^0.1.0
karma-chrome-launcher: ^3.1.0
karma-coverage-istanbul-reporter: ^3.0.2
karma-mocha: ^2.0.0
karma-mocha-reporter: ^2.0.4
karma-sinon: ^1.0.5
karma-source-map-support: ^1.4.0
katex: ^0.16.0
lodash.debounce: ^4.0.3
......@@ -9020,16 +9012,6 @@ __metadata:
languageName: node
linkType: hard
"karma-chai@npm:^0.1.0":
version: 0.1.0
resolution: "karma-chai@npm:0.1.0"
peerDependencies:
chai: "*"
karma: ">=0.10.9"
checksum: 7fae0b4acea35121218c5284e49c7a0e4ad5806abca50ee1451e314e63b4e7b72aaccda90a78d0099cc3a02eb07ebea92cc8877b74cfd62db52fe7bb0907a287
languageName: node
linkType: hard
"karma-chrome-launcher@npm:^3.1.0":
version: 3.2.0
resolution: "karma-chrome-launcher@npm:3.2.0"
......@@ -9074,16 +9056,6 @@ __metadata:
languageName: node
linkType: hard
"karma-sinon@npm:^1.0.5":
version: 1.0.5
resolution: "karma-sinon@npm:1.0.5"
peerDependencies:
karma: ">=0.10"
sinon: "*"
checksum: 86ee1ec40d5cb2c9c9ff6bc1cfd6aabd310e28d1a140d06322a2769e89d27eb699feab3610633d0cfabf4f302e14c48c332b588da3c0bab710a78f3d04138774
languageName: node
linkType: hard
"karma-source-map-support@npm:^1.4.0":
version: 1.4.0
resolution: "karma-source-map-support@npm:1.4.0"
......@@ -9393,12 +9365,12 @@ __metadata:
languageName: node
linkType: hard
"loupe@npm:^2.3.6":
version: 2.3.6
resolution: "loupe@npm:2.3.6"
"loupe@npm:^3.0.0":
version: 3.1.0
resolution: "loupe@npm:3.1.0"
dependencies:
get-func-name: ^2.0.0
checksum: cc83f1b124a1df7384601d72d8d1f5fe95fd7a8185469fec48bb2e4027e45243949e7a013e8d91051a138451ff0552310c32aa9786e60b6a30d1e801bdc2163f
get-func-name: ^2.0.1
checksum: e23814854ab2571e3f753b7c198bfe016c708f3a435501624dd6ff79b6a5544e14b0f28cfc0432eb22e9da9177b1533491871aca3f94d56b19fecc0d4a766e58
languageName: node
linkType: hard
......@@ -10998,10 +10970,10 @@ __metadata:
languageName: node
linkType: hard
"pathval@npm:^1.1.1":
version: 1.1.1
resolution: "pathval@npm:1.1.1"
checksum: 090e3147716647fb7fb5b4b8c8e5b55e5d0a6086d085b6cd23f3d3c01fcf0ff56fd3cc22f2f4a033bd2e46ed55d61ed8379e123b42afe7d531a2a5fc8bb556d6
"pathval@npm:^2.0.0":
version: 2.0.0
resolution: "pathval@npm:2.0.0"
checksum: 682b6a6289de7990909effef7dae9aa7bb6218c0426727bccf66a35b34e7bfbc65615270c5e44e3c9557a5cb44b1b9ef47fc3cb18bce6ad3ba92bcd28467ed7d
languageName: node
linkType: hard
......@@ -13321,7 +13293,7 @@ __metadata:
languageName: node
linkType: hard
"type-detect@npm:4.0.8, type-detect@npm:^4.0.0, type-detect@npm:^4.0.8":
"type-detect@npm:4.0.8, type-detect@npm:^4.0.8":
version: 4.0.8
resolution: "type-detect@npm:4.0.8"
checksum: 62b5628bff67c0eb0b66afa371bd73e230399a8d2ad30d852716efcc4656a7516904570cd8631a49a3ce57c10225adf5d0cbdcb47f6b0255fe6557c453925a15
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment