Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 32 additions & 17 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 @@ -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",
Comment thread
coderabbitai[bot] marked this conversation as resolved.
"jasmine-spec-reporter": "7.0.0",
"jsdoc": "4.0.4",
"jsdoc-babel": "0.5.0",
Expand Down
2 changes: 1 addition & 1 deletion spec/InstallationsRouter.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion spec/ParsePolygon.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down
2 changes: 1 addition & 1 deletion spec/ParseQuery.Aggregate.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) });
Expand Down
4 changes: 2 additions & 2 deletions spec/ParseQuery.hint.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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();

Expand Down
52 changes: 24 additions & 28 deletions spec/support/CurrentSpecReporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Loading