Skip to content

Commit 97d4a9e

Browse files
authoredMar 11, 2025··
refactor: Bump to jasmine 5.6.0 (#9453)
1 parent 5a2f3b8 commit 97d4a9e

12 files changed

+572
-56
lines changed
 

Diff for: ‎package-lock.json

+543-17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: ‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
"globals": "15.15.0",
9494
"graphql-tag": "2.12.6",
9595
"husky": "9.1.7",
96-
"jasmine": "3.5.0",
96+
"jasmine": "5.6.0",
9797
"jasmine-spec-reporter": "7.0.0",
9898
"jsdoc": "4.0.4",
9999
"jsdoc-babel": "0.5.0",

Diff for: ‎spec/CloudCodeLogger.spec.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ describe('Cloud Code Logger', () => {
287287
});
288288

289289
xit('should log a changed beforeSave indicating a change', done => {
290+
pending('needs more work.....');
290291
const logController = new LoggerController(new WinstonLoggerAdapter());
291292

292293
Parse.Cloud.beforeSave('MyObject', req => {
@@ -309,7 +310,7 @@ describe('Cloud Code Logger', () => {
309310
done();
310311
})
311312
.then(null, e => done.fail(JSON.stringify(e)));
312-
}).pend('needs more work.....');
313+
});
313314

314315
it_id('b86e8168-8370-4730-a4ba-24ca3016ad66')(it)('cloud function should obfuscate password', done => {
315316
Parse.Cloud.define('testFunction', () => {

Diff for: ‎spec/MongoStorageAdapter.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ const fakeClient = {
1515
// These tests are specific to the mongo storage adapter + mongo storage format
1616
// and will eventually be moved into their own repo
1717
describe_only_db('mongo')('MongoStorageAdapter', () => {
18-
beforeEach(done => {
19-
new MongoStorageAdapter({ uri: databaseURI }).deleteAllClasses().then(done, fail);
18+
beforeEach(async () => {
19+
await new MongoStorageAdapter({ uri: databaseURI }).deleteAllClasses();
2020
Config.get(Parse.applicationId).schemaCache.clear();
2121
});
2222

Diff for: ‎spec/ParseGlobalConfig.spec.js

+3-7
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const request = require('../lib/request');
44
const Config = require('../lib/Config');
55

66
describe('a GlobalConfig', () => {
7-
beforeEach(done => {
7+
beforeEach(async () => {
88
const config = Config.get('test');
99
const query = on_db(
1010
'mongo',
@@ -16,7 +16,7 @@ describe('a GlobalConfig', () => {
1616
return { objectId: '1' };
1717
}
1818
);
19-
config.database.adapter
19+
await config.database.adapter
2020
.upsertOneObject(
2121
'_GlobalConfig',
2222
{
@@ -31,11 +31,7 @@ describe('a GlobalConfig', () => {
3131
params: { companies: ['US', 'DK'], counter: 20, internalParam: 'internal' },
3232
masterKeyOnly: { internalParam: true },
3333
}
34-
)
35-
.then(done, err => {
36-
jfail(err);
37-
done();
38-
});
34+
);
3935
});
4036

4137
const headers = {

Diff for: ‎spec/ParseQuery.Aggregate.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ const get = function (url, options) {
6969
};
7070

7171
describe('Parse.Query Aggregate testing', () => {
72-
beforeEach(done => {
73-
loadTestData().then(done, done);
72+
beforeEach(async () => {
73+
await loadTestData();
7474
});
7575

7676
it('should only query aggregate with master key', done => {

Diff for: ‎spec/ParseUser.spec.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -3663,6 +3663,7 @@ describe('Parse.User testing', () => {
36633663
});
36643664

36653665
xit('should not send a verification email if the user signed up using oauth', done => {
3666+
pending('this test fails. See: https://github.com/parse-community/parse-server/issues/5097');
36663667
let emailCalledCount = 0;
36673668
const emailAdapter = {
36683669
sendVerificationEmail: () => {
@@ -3691,7 +3692,7 @@ describe('Parse.User testing', () => {
36913692
done();
36923693
});
36933694
});
3694-
}).pend('this test fails. See: https://github.com/parse-community/parse-server/issues/5097');
3695+
});
36953696

36963697
it('should be able to update user with authData passed', done => {
36973698
let objectId;

Diff for: ‎spec/PublicAPI.spec.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ describe('public API', () => {
8989
});
9090

9191
describe('public API without publicServerURL', () => {
92-
beforeEach(done => {
93-
reconfigureServer({ appName: 'unused' }).then(done, fail);
92+
beforeEach(async () => {
93+
await reconfigureServer({ appName: 'unused' });
9494
});
9595
it('should get 404 on verify_email', done => {
9696
request('http://localhost:8378/1/apps/test/verify_email', (err, httpResponse) => {
@@ -115,8 +115,8 @@ describe('public API without publicServerURL', () => {
115115
});
116116

117117
describe('public API supplied with invalid application id', () => {
118-
beforeEach(done => {
119-
reconfigureServer({ appName: 'unused' }).then(done, fail);
118+
beforeEach(async () => {
119+
await reconfigureServer({ appName: 'unused' });
120120
});
121121

122122
it('should get 403 on verify_email', done => {

Diff for: ‎spec/PurchaseValidation.spec.js

+2-7
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,8 @@ function createProduct() {
2323
}
2424

2525
describe('test validate_receipt endpoint', () => {
26-
beforeEach(done => {
27-
createProduct()
28-
.then(done)
29-
.catch(function (err) {
30-
console.error({ err });
31-
done();
32-
});
26+
beforeEach(async () => {
27+
await createProduct();
3328
});
3429

3530
it('should bypass appstore validation', async () => {

Diff for: ‎spec/PushController.spec.js

+4-7
Original file line numberDiff line numberDiff line change
@@ -1224,14 +1224,11 @@ describe('PushController', () => {
12241224
},
12251225
};
12261226

1227-
beforeEach(done => {
1228-
reconfigureServer({
1227+
beforeEach(async () => {
1228+
await reconfigureServer({
12291229
push: { adapter: pushAdapter },
1230-
})
1231-
.then(() => {
1232-
config = Config.get(Parse.applicationId);
1233-
})
1234-
.then(done, done.fail);
1230+
});
1231+
config = Config.get(Parse.applicationId);
12351232
});
12361233

12371234
it('should throw if both expiration_time and expiration_interval are set', () => {

Diff for: ‎spec/RevocableSessionsUpgrade.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ function createUser() {
1515
}
1616

1717
describe_only_db('mongo')('revocable sessions', () => {
18-
beforeEach(done => {
18+
beforeEach(async () => {
1919
// Create 1 user with the legacy
20-
createUser().then(done);
20+
await createUser();
2121
});
2222

2323
it('should upgrade legacy session token', done => {

Diff for: ‎spec/UserPII.spec.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ describe('Personally Identifiable Information', () => {
243243
});
244244

245245
describe('with deprecated configured sensitive fields', () => {
246-
beforeEach(done => {
247-
return reconfigureServer({ userSensitiveFields: ['ssn', 'zip'] }).then(done);
246+
beforeEach(async () => {
247+
await reconfigureServer({ userSensitiveFields: ['ssn', 'zip'] });
248248
});
249249

250250
it('should be able to get own PII via API with object', done => {
@@ -691,12 +691,12 @@ describe('Personally Identifiable Information', () => {
691691
});
692692

693693
describe('with configured sensitive fields via CLP', () => {
694-
beforeEach(done => {
695-
reconfigureServer({
694+
beforeEach(async () => {
695+
await reconfigureServer({
696696
protectedFields: {
697697
_User: { '*': ['ssn', 'zip'], 'role:Administrator': [] },
698698
},
699-
}).then(done);
699+
});
700700
});
701701

702702
it('should be able to get own PII via API with object', done => {

0 commit comments

Comments
 (0)
Please sign in to comment.