diff --git a/package-lock.json b/package-lock.json index 0b00b059f8..4dace16fb4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -83,7 +83,7 @@ "form-data": "4.0.5", "globals": "17.3.0", "graphql-tag": "2.12.6", - "jasmine": "5.7.1", + "jasmine": "6.1.0", "jasmine-spec-reporter": "7.0.0", "jsdoc": "4.0.4", "jsdoc-babel": "0.5.0", @@ -3235,6 +3235,13 @@ "node": ">=8" } }, + "node_modules/@jasminejs/reporters": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@jasminejs/reporters/-/reporters-1.0.0.tgz", + "integrity": "sha512-rM3GG4vx2H1Gp5kYCTr9aKlOEJFd43pzpiMAiy5b1+FUc2ub4e6bS6yCi/WQNDzAa5MVp9++dwcoEtcIfoEnhA==", + "dev": true, + "license": "MIT" + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.13", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", @@ -14759,23 +14766,24 @@ } }, "node_modules/jasmine": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-5.7.1.tgz", - "integrity": "sha512-E/4fkRNy/9ALz6z3Z3/tYXFAohoznVy7In9FWutG2fqBSkILJHFzbgZtHJUw5UrL3jgUQ4sdGYOVZ5KpSXYjGw==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-6.1.0.tgz", + "integrity": "sha512-WPphPqEMY0uBRMjuhRHoVoxQNvJuxIMqz0yIcJ3k3oYxBedeGoH60/NXNgasxnx2FvfXrq5/r+2wssJ7WE8ABw==", "dev": true, "license": "MIT", "dependencies": { - "glob": "^10.2.2", - "jasmine-core": "~5.7.0" + "@jasminejs/reporters": "^1.0.0", + "glob": "^10.2.2 || ^11.0.3 || ^12.0.0 || ^13.0.0", + "jasmine-core": "~6.1.0" }, "bin": { "jasmine": "bin/jasmine.js" } }, "node_modules/jasmine-core": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-5.7.1.tgz", - "integrity": "sha512-QnurrtpKsPoixxG2R3d1xP0St/2kcX5oTZyDyQJMY+Vzi/HUlu1kGm+2V8Tz+9lV991leB1l0xcsyz40s9xOOw==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-6.1.0.tgz", + "integrity": "sha512-p/tjBw58O6vxKIWMlrU+yys8lqR3+l3UrqwNTT7wpj+dQ7N4etQekFM8joI+cWzPDYqZf54kN+hLC1+s5TvZvg==", "dev": true, "license": "MIT" }, @@ -28992,6 +29000,12 @@ "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", "dev": true }, + "@jasminejs/reporters": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@jasminejs/reporters/-/reporters-1.0.0.tgz", + "integrity": "sha512-rM3GG4vx2H1Gp5kYCTr9aKlOEJFd43pzpiMAiy5b1+FUc2ub4e6bS6yCi/WQNDzAa5MVp9++dwcoEtcIfoEnhA==", + "dev": true + }, "@jridgewell/gen-mapping": { "version": "0.3.13", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", @@ -36963,13 +36977,14 @@ } }, "jasmine": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-5.7.1.tgz", - "integrity": "sha512-E/4fkRNy/9ALz6z3Z3/tYXFAohoznVy7In9FWutG2fqBSkILJHFzbgZtHJUw5UrL3jgUQ4sdGYOVZ5KpSXYjGw==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-6.1.0.tgz", + "integrity": "sha512-WPphPqEMY0uBRMjuhRHoVoxQNvJuxIMqz0yIcJ3k3oYxBedeGoH60/NXNgasxnx2FvfXrq5/r+2wssJ7WE8ABw==", "dev": true, "requires": { - "glob": "^10.2.2", - "jasmine-core": "~5.7.0" + "@jasminejs/reporters": "^1.0.0", + "glob": "^10.2.2 || ^11.0.3 || ^12.0.0 || ^13.0.0", + "jasmine-core": "~6.1.0" }, "dependencies": { "brace-expansion": { @@ -37029,9 +37044,9 @@ } }, "jasmine-core": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-5.7.1.tgz", - "integrity": "sha512-QnurrtpKsPoixxG2R3d1xP0St/2kcX5oTZyDyQJMY+Vzi/HUlu1kGm+2V8Tz+9lV991leB1l0xcsyz40s9xOOw==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-6.1.0.tgz", + "integrity": "sha512-p/tjBw58O6vxKIWMlrU+yys8lqR3+l3UrqwNTT7wpj+dQ7N4etQekFM8joI+cWzPDYqZf54kN+hLC1+s5TvZvg==", "dev": true }, "jasmine-spec-reporter": { diff --git a/package.json b/package.json index 23299dc82b..3f350ec921 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,7 @@ "form-data": "4.0.5", "globals": "17.3.0", "graphql-tag": "2.12.6", - "jasmine": "5.7.1", + "jasmine": "6.1.0", "jasmine-spec-reporter": "7.0.0", "jsdoc": "4.0.4", "jsdoc-babel": "0.5.0", diff --git a/spec/InstallationsRouter.spec.js b/spec/InstallationsRouter.spec.js index 8e5a80c135..1ccad5013d 100644 --- a/spec/InstallationsRouter.spec.js +++ b/spec/InstallationsRouter.spec.js @@ -166,7 +166,7 @@ describe('InstallationsRouter', () => { }); }); - it_only_db('postgres')('query installations with count = 1', async () => { + it_only_db('postgres')('query installations with count = 1 postgres', async () => { const config = Config.get('test'); const androidDeviceRequest = { installationId: '12345678-abcd-abcd-abcd-123456789abc', diff --git a/spec/ParsePolygon.spec.js b/spec/ParsePolygon.spec.js index b53846d4ba..c2fc903206 100644 --- a/spec/ParsePolygon.spec.js +++ b/spec/ParsePolygon.spec.js @@ -423,7 +423,7 @@ describe('Parse.Polygon testing', () => { }); }); -describe_only_db('mongo')('Parse.Polygon testing', () => { +describe_only_db('mongo')('Parse.Polygon testing mongo', () => { const Config = require('../lib/Config'); let config; beforeEach(async () => { diff --git a/spec/ParseQuery.Aggregate.spec.js b/spec/ParseQuery.Aggregate.spec.js index eb9c03ac4e..1085589fb4 100644 --- a/spec/ParseQuery.Aggregate.spec.js +++ b/spec/ParseQuery.Aggregate.spec.js @@ -474,7 +474,7 @@ describe('Parse.Query Aggregate testing', () => { }); it_only_db('postgres')( - 'can group by any date field (it does not work if you have dirty data)', // rows in your collection with non date data in the field that is supposed to be a date + 'can group by any date field postgres (it does not work if you have dirty data)', // rows in your collection with non date data in the field that is supposed to be a date done => { const obj1 = new TestObject({ dateField2019: new Date(1990, 11, 1) }); const obj2 = new TestObject({ dateField2019: new Date(1990, 5, 1) }); diff --git a/spec/ParseQuery.hint.spec.js b/spec/ParseQuery.hint.spec.js index 5a6ed63b19..2f61f658db 100644 --- a/spec/ParseQuery.hint.spec.js +++ b/spec/ParseQuery.hint.spec.js @@ -39,7 +39,7 @@ describe_only_db('mongo')('Parse.Query hint', () => { expect(explain.queryPlanner.winningPlan.inputStage.indexName).toBe('_id_'); }); - it_only_mongodb_version('>=8')('query find with hint string', async () => { + it_only_mongodb_version('>=8')('query find with hint string mongodb 8', async () => { const object = new TestObject(); await object.save(); @@ -65,7 +65,7 @@ describe_only_db('mongo')('Parse.Query hint', () => { }); }); - it_only_mongodb_version('>=8')('query find with hint object', async () => { + it_only_mongodb_version('>=8')('query find with hint object mongodb 8', async () => { const object = new TestObject(); await object.save(); diff --git a/spec/support/CurrentSpecReporter.js b/spec/support/CurrentSpecReporter.js index 1638b78a77..0b63b6db04 100755 --- a/spec/support/CurrentSpecReporter.js +++ b/spec/support/CurrentSpecReporter.js @@ -70,35 +70,31 @@ global.normalizeAsyncTests = function() { return fn; } - // Wrap it() specs - const originalSpecConstructor = jasmine.Spec; - jasmine.Spec = function(attrs) { - const spec = new originalSpecConstructor(attrs); - spec.queueableFn.fn = wrapDoneCallback(spec.queueableFn.fn); - return spec; - }; + function wrapGlobal(name) { + const original = global[name]; + global[name] = function(descriptionOrFn, fn, timeout) { + const args = Array.from(arguments); + if (typeof descriptionOrFn === 'function') { + args[0] = wrapDoneCallback(descriptionOrFn); + return original.apply(this, args); + } + if (typeof fn === 'function') { + args[1] = wrapDoneCallback(fn); + return original.apply(this, args); + } + return original.apply(this, args); + }; + if (original.each) { + global[name].each = original.each; + } + } - // Wrap beforeEach/afterEach/beforeAll/afterAll - const originalBeforeEach = jasmine.Suite.prototype.beforeEach; - jasmine.Suite.prototype.beforeEach = function(fn) { - fn.fn = wrapDoneCallback(fn.fn); - return originalBeforeEach.call(this, fn); - }; - const originalAfterEach = jasmine.Suite.prototype.afterEach; - jasmine.Suite.prototype.afterEach = function(fn) { - fn.fn = wrapDoneCallback(fn.fn); - return originalAfterEach.call(this, fn); - }; - const originalBeforeAll = jasmine.Suite.prototype.beforeAll; - jasmine.Suite.prototype.beforeAll = function(fn) { - fn.fn = wrapDoneCallback(fn.fn); - return originalBeforeAll.call(this, fn); - }; - const originalAfterAll = jasmine.Suite.prototype.afterAll; - jasmine.Suite.prototype.afterAll = function(fn) { - fn.fn = wrapDoneCallback(fn.fn); - return originalAfterAll.call(this, fn); - }; + wrapGlobal('it'); + wrapGlobal('fit'); + wrapGlobal('beforeEach'); + wrapGlobal('afterEach'); + wrapGlobal('beforeAll'); + wrapGlobal('afterAll'); }; module.exports = CurrentSpecReporter;