Skip to content

Commit

Permalink
Upgrade Chai to 5.x (#6197)
Browse files Browse the repository at this point in the history
  • Loading branch information
willeastcott authored Mar 22, 2024
1 parent f50e6c7 commit e969efe
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 91 deletions.
140 changes: 53 additions & 87 deletions package-lock.json

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

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,12 @@
"@rollup/plugin-terser": "^0.4.4",
"@rollup/pluginutils": "^5.1.0",
"c8": "^9.1.0",
"chai": "^4.3.10",
"chai": "^5.1.0",
"eslint": "^8.57.0",
"fflate": "^0.8.2",
"global-jsdom": "^24.0.0",
"jsdom": "^24.0.0",
"karma": "^6.4.3",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^3.2.0",
"karma-mocha": "^2.0.1",
"karma-sinon": "^1.0.5",
Expand Down
5 changes: 3 additions & 2 deletions tests/karma.conf.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ module.exports = function (config) {

// list of files / patterns to load in the browser
files: [
{ pattern: 'node_modules/chai/chai.js', type: 'module' },
{ pattern: 'tests/setup.js', type: 'module' },
'build/playcanvas.js',

// test files - change this to a specific file in order to run a single suite
Expand Down Expand Up @@ -37,11 +39,10 @@ module.exports = function (config) {

// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['mocha', 'chai', 'sinon'],
frameworks: ['mocha', 'sinon'],

plugins: [
'karma-mocha',
'karma-chai',
'karma-sinon',
'karma-chrome-launcher',
'karma-spec-reporter'
Expand Down
3 changes: 3 additions & 0 deletions tests/setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { expect } from '../node_modules/chai/chai.js';

window.expect = expect;

0 comments on commit e969efe

Please sign in to comment.