Skip to content

Commit

Permalink
Bump chai to 5.0.0
Browse files Browse the repository at this point in the history
 - fix requires -> dynamic import
 - should registered vi -r on command

Change-Id: Iadf9a5146282cbbc183b2d6b8e5db2da33bf2f13
  • Loading branch information
bpedersen2 committed Jan 19, 2024
1 parent e6de00e commit d4b5d9e
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 46 deletions.
68 changes: 30 additions & 38 deletions package-lock.json

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

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:api": "npm run test:api:jest --maxWorkers=50% && concurrently -k -s first \"wait-on http://localhost:3000/explorer/ && npm run test:api:mocha\" \"npm run start\"",
"test:api:jest": "jest --config ./test/config/jest-e2e.json --maxWorkers=50%",
"test:api:mocha": "mocha --config ./test/config/.mocharc.json",
"test:api:mocha": "mocha --config ./test/config/.mocharc.json -r chai/register-should.js ",
"prepare:local": "docker-compose -f CI/E2E/docker-compose-local.yaml --env-file CI/E2E/.env.elastic-search up -d && cp functionalAccounts.json.test functionalAccounts.json"
},
"dependencies": {
Expand Down Expand Up @@ -81,7 +81,7 @@
"@nestjs/schematics": "^10.0.1",
"@nestjs/testing": "^9.0.0",
"@types/bcrypt": "^5.0.0",
"@types/chai": "^4.3.3",
"@types/chai": "^4.3.6",
"@types/express": "^4.17.13",
"@types/express-session": "^1.17.4",
"@types/jest": "^27.0.2",
Expand All @@ -97,8 +97,8 @@
"@types/uuid": "^9.0.0",
"@typescript-eslint/eslint-plugin": "^6.3.0",
"@typescript-eslint/parser": "^6.3.0",
"chai": "^4.3.6",
"chai-http": "^4.3.0",
"chai": "^5.0.0",
"chai-http": "^4.3.6",
"concurrently": "^8.0.1",
"eslint": "^8.46.0",
"eslint-config-loopback": "^13.1.0",
Expand Down
11 changes: 7 additions & 4 deletions test/config/pretest.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
/* eslint-disable @typescript-eslint/no-var-requires */
//NOTE: Here we load and initialize some global variables that are used throughout the tests
const chai = require("chai");
const chaiHttp = require("chai-http");
chai.should();
chai.use(chaiHttp);

var chaiHttp = require("chai-http");
async function loadChai() {
const { chai } = import("chai");
chai.use(chaiHttp);
}
loadChai();

global.appUrl = "http://localhost:3000";
global.request = require("supertest");

0 comments on commit d4b5d9e

Please sign in to comment.