Skip to content

Commit

Permalink
Bump chai from 4.3.10 to 5.0.0 (#1796)
Browse files Browse the repository at this point in the history
* Bump chai from 4.3.10 to 5.0.0

Bumps [chai](https://github.com/chaijs/chai) from 4.3.10 to 5.0.0.
- [Release notes](https://github.com/chaijs/chai/releases)
- [Changelog](https://github.com/chaijs/chai/blob/main/History.md)
- [Commits](chaijs/chai@v4.3.10...v5.0.0)

---
updated-dependencies:
- dependency-name: chai
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Refactored code to work with chai 5

* Reverted mongo version update pending mongo 6 upgrade work

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Andrew Brazzatti <[email protected]>
  • Loading branch information
dependabot[bot] and andrewbrazzatti authored Jan 11, 2024
1 parent 0834bd4 commit fa07b30
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 97 deletions.
75 changes: 29 additions & 46 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"@types/lodash-es": "^4.17.12",
"@types/node": "^20.10.8",
"bower": "^1.8.14",
"chai": "^4.3.10",
"chai": "^5.0.0",
"ejs-cli": "^2.2.3",
"istanbul": "^0.4.5",
"mocha": "^10.2.0",
Expand Down
2 changes: 1 addition & 1 deletion support/integration-testing/docker-compose.mocha.yml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ networks:
main:
services:
redboxportal:
image: qcifengineering/redbox-portal:feature-node20
image: qcifengineering/redbox-portal:develop
ports:
- "1500:1500"
volumes:
Expand Down
2 changes: 1 addition & 1 deletion support/integration-testing/docker-compose.newman.yml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ networks:
main:
services:
redboxportal:
image: qcifengineering/redbox-portal:feature-node20
image: qcifengineering/redbox-portal:develop
ports:
- "1500:1500"
volumes:
Expand Down
73 changes: 38 additions & 35 deletions test/bootstrap.test.js
Original file line number Diff line number Diff line change
@@ -1,54 +1,57 @@
var sails = require('sails');
var _ = require('lodash');


global.chai = require('chai');
global.should = chai.should();
global.expect = chai.expect;
global.moment = require('moment');



before(function (done) {
// Increase the Mocha timeout so that Sails has enough time to lift.
this.timeout(120000);
sails.lift({
log: {
level: 'verbose'
},
hooks: {
grunt: false
},
models: {
datastore: 'mongodb',
migrate: 'drop'
},
security: {
csrf: false
},
datacite: {
import('chai').then(chai => {
global.chai = chai;
global.should = chai.should();
global.expect = chai.expect;

// Increase the Mocha timeout so that Sails has enough time to lift.
this.timeout(120000);
sails.lift({
log: {
level: 'verbose'
},
hooks: {
grunt: false
},
models: {
datastore: 'mongodb',
migrate: 'drop'
},
security: {
csrf: false
},
datacite: {
username: process.env.datacite_username,
password: process.env.datacite_password,
doiPrefix: process.env.datacite_doiPrefix
},
auth: {
default: {
local: {
default: {
token: 'jA8mF8CBpwHGkJqlgg6dT3hEDoZTQIif5t1V9ElIcN8='
}
}
}
}
},
auth: {
default: {
local: {
default: {
token: 'jA8mF8CBpwHGkJqlgg6dT3hEDoZTQIif5t1V9ElIcN8='
}
}
}
}
}, function (err, server) {
if (err) return done(err);
done(err, sails);
if (err) return done(err);
done(err, sails);
});
});


});

after(function (done) {
// here you can clear fixtures, etc.
if (sails && _.isFunction(sails.lower)) {
sails.lower(done);
sails.lower(done);
}
});
1 change: 0 additions & 1 deletion test/unit/services/AgendaService.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const { expect } = require("chai");

describe('The Agenda Queue Service', function () {
before(function (done) {
Expand Down
4 changes: 0 additions & 4 deletions test/unit/services/DOIService.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
const {
expect
} = require("chai");

describe('The DOI Service', function () {
before(function (done) {
done();
Expand Down
2 changes: 1 addition & 1 deletion test/unit/services/FormsService.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { expect } = require("chai");


describe('The FormsService', function () {
before(function (done) {
Expand Down
4 changes: 1 addition & 3 deletions test/unit/services/ReportsService.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
const {
expect
} = require("chai");


describe('The Reporting Service', function () {
before(function (done) {
Expand Down
4 changes: 0 additions & 4 deletions test/unit/services/SolrSearchService.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
const {
expect
} = require("chai");

describe('The Solr Indexing Service', function () {
before(function (done) {
done()
Expand Down

0 comments on commit fa07b30

Please sign in to comment.