From 9552a4cbee907520055cdf0ad136e9570557dd17 Mon Sep 17 00:00:00 2001 From: Manuel <5673677+mtrezza@users.noreply.github.com> Date: Tue, 13 Aug 2024 22:13:19 +0200 Subject: [PATCH] ci: Fix test exclusion list in combination with other exclusions (#9277) --- .github/workflows/ci.yml | 4 +- spec/AudienceRouter.spec.js | 4 +- spec/AuthenticationAdapters.spec.js | 12 +- spec/CLI.spec.js | 8 +- spec/CloudCode.spec.js | 12 +- spec/CloudCodeLogger.spec.js | 20 ++-- spec/DefinedSchemas.spec.js | 2 +- spec/EmailVerificationToken.spec.js | 28 ++--- spec/Idempotency.spec.js | 16 +-- spec/LogsRouter.spec.js | 6 +- spec/Middlewares.spec.js | 10 +- spec/PagesRouter.spec.js | 8 +- spec/Parse.Push.spec.js | 8 +- spec/ParseAPI.spec.js | 16 +-- spec/ParseGeoPoint.spec.js | 22 ++-- spec/ParseGlobalConfig.spec.js | 2 +- spec/ParseGraphQLSchema.spec.js | 4 +- spec/ParseGraphQLServer.spec.js | 44 ++++---- spec/ParseHooks.spec.js | 24 ++-- spec/ParseInstallation.spec.js | 8 +- spec/ParseLiveQuery.spec.js | 6 +- spec/ParsePolygon.spec.js | 2 +- spec/ParseQuery.Aggregate.spec.js | 134 +++++++++++------------ spec/ParseQuery.FullTextSearch.spec.js | 18 +-- spec/ParseQuery.spec.js | 22 ++-- spec/ParseRole.spec.js | 2 +- spec/ParseUser.spec.js | 8 +- spec/PasswordPolicy.spec.js | 12 +- spec/PointerPermissions.spec.js | 20 ++-- spec/PushController.spec.js | 16 +-- spec/PushWorker.spec.js | 2 +- spec/RegexVulnerabilities.spec.js | 2 +- spec/RestQuery.spec.js | 4 +- spec/SchemaPerformance.spec.js | 4 +- spec/Uniqueness.spec.js | 2 +- spec/UserController.spec.js | 4 +- spec/ValidationAndPasswordsReset.spec.js | 12 +- spec/WinstonLoggerAdapter.spec.js | 2 +- spec/helper.js | 28 ++--- spec/rest.spec.js | 2 +- spec/schemas.spec.js | 12 +- spec/vulnerabilities.spec.js | 2 +- 42 files changed, 281 insertions(+), 293 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67f5f05956..bde3879a21 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -175,7 +175,7 @@ jobs: NODE_VERSION: 18.20.4 fail-fast: false name: ${{ matrix.name }} - timeout-minutes: 15 + timeout-minutes: 20 runs-on: ubuntu-latest services: redis: @@ -242,7 +242,7 @@ jobs: NODE_VERSION: 22.4.1 fail-fast: false name: ${{ matrix.name }} - timeout-minutes: 15 + timeout-minutes: 20 runs-on: ubuntu-latest services: redis: diff --git a/spec/AudienceRouter.spec.js b/spec/AudienceRouter.spec.js index 95178bf37b..1525147a40 100644 --- a/spec/AudienceRouter.spec.js +++ b/spec/AudienceRouter.spec.js @@ -317,7 +317,7 @@ describe('AudiencesRouter', () => { ); }); - it_id('af1111b5-3251-4b40-8f06-fb0fc624fa91')(it_exclude_dbs(['postgres'])('should support legacy parse.com audience fields', done => { + it_id('af1111b5-3251-4b40-8f06-fb0fc624fa91')(it_exclude_dbs(['postgres']))('should support legacy parse.com audience fields', done => { const database = Config.get(Parse.applicationId).database.adapter.database; const now = new Date(); Parse._request( @@ -369,7 +369,7 @@ describe('AudiencesRouter', () => { }); }); }); - })); + }); it('should be able to search on audiences', done => { Parse._request( diff --git a/spec/AuthenticationAdapters.spec.js b/spec/AuthenticationAdapters.spec.js index e5733ec396..32fcdca891 100644 --- a/spec/AuthenticationAdapters.spec.js +++ b/spec/AuthenticationAdapters.spec.js @@ -2022,7 +2022,7 @@ describe('facebook limited auth adapter', () => { } }); - it_id('7bfa55ab-8fd7-4526-992e-6de3df16bf9c', 'should use algorithm from key header to verify id_token (facebook.com)', async () => { + it_id('7bfa55ab-8fd7-4526-992e-6de3df16bf9c')(it)('should use algorithm from key header to verify id_token (facebook.com)', async () => { const fakeClaim = { iss: 'https://www.facebook.com', aud: 'secret', @@ -2072,7 +2072,7 @@ describe('facebook limited auth adapter', () => { } }); - it_id('4bcb1a1a-11f8-4e12-a3f6-73f7e25e355a', '(using client id as string) should verify id_token (facebook.com)', async () => { + it_id('4bcb1a1a-11f8-4e12-a3f6-73f7e25e355a')(it)('using client id as string) should verify id_token (facebook.com)', async () => { const fakeClaim = { iss: 'https://www.facebook.com', aud: 'secret', @@ -2092,7 +2092,7 @@ describe('facebook limited auth adapter', () => { expect(result).toEqual(fakeClaim); }); - it_id('c521a272-2ac2-4d8b-b5ed-ea250336d8b1', '(using client id as array) should verify id_token (facebook.com)', async () => { + it_id('c521a272-2ac2-4d8b-b5ed-ea250336d8b1')(it)('(using client id as array) should verify id_token (facebook.com)', async () => { const fakeClaim = { iss: 'https://www.facebook.com', aud: 'secret', @@ -2112,7 +2112,7 @@ describe('facebook limited auth adapter', () => { expect(result).toEqual(fakeClaim); }); - it_id('e3f16404-18e9-4a87-a555-4710cfbdac67')('(using client id as array with multiple items) should verify id_token (facebook.com)', async () => { + it_id('e3f16404-18e9-4a87-a555-4710cfbdac67')(it)('(using client id as array with multiple items) should verify id_token (facebook.com)', async () => { const fakeClaim = { iss: 'https://www.facebook.com', aud: 'secret', @@ -2132,7 +2132,7 @@ describe('facebook limited auth adapter', () => { expect(result).toEqual(fakeClaim); }); - it_id('549c33a1-3a6b-4732-8cf6-8f010ad4569c')('(using client id as string) should throw error with with invalid jwt issuer (facebook.com)', async () => { + it_id('549c33a1-3a6b-4732-8cf6-8f010ad4569c')(it)('(using client id as string) should throw error with with invalid jwt issuer (facebook.com)', async () => { const fakeClaim = { iss: 'https://not.facebook.com', sub: 'the_user_id', @@ -2263,7 +2263,7 @@ describe('facebook limited auth adapter', () => { } }); - it_id('c194d902-e697-46c9-a303-82c2d914473c', 'should throw error with with invalid user id (facebook.com)', async () => { + it_id('c194d902-e697-46c9-a303-82c2d914473c')(it)('should throw error with with invalid user id (facebook.com)', async () => { const fakeClaim = { iss: 'https://www.facebook.com', aud: 'invalid_client_id', diff --git a/spec/CLI.spec.js b/spec/CLI.spec.js index ed5c15abf1..f78b542e52 100644 --- a/spec/CLI.spec.js +++ b/spec/CLI.spec.js @@ -248,7 +248,7 @@ describe('execution', () => { } }); - it_id('a0ab74b4-f805-4e03-b31d-b5cd59e64495', 'should start Parse Server', done => { + it_id('a0ab74b4-f805-4e03-b31d-b5cd59e64495')(it)('should start Parse Server', done => { const env = { ...process.env }; env.NODE_OPTIONS = '--dns-result-order=ipv4first --trace-deprecation'; childProcess = spawn( @@ -261,7 +261,7 @@ describe('execution', () => { handleError(childProcess, done); }); - it_id('d7165081-b133-4cba-901b-19128ce41301', 'should start Parse Server with GraphQL', async done => { + it_id('d7165081-b133-4cba-901b-19128ce41301')(it)('should start Parse Server with GraphQL', async done => { const env = { ...process.env }; env.NODE_OPTIONS = '--dns-result-order=ipv4first --trace-deprecation'; childProcess = spawn( @@ -287,7 +287,7 @@ describe('execution', () => { handleError(childProcess, done); }); - it_id('2769cdb4-ce8a-484d-8a91-635b5894ba7e', 'should start Parse Server with GraphQL and Playground', async done => { + it_id('2769cdb4-ce8a-484d-8a91-635b5894ba7e')(it)('should start Parse Server with GraphQL and Playground', async done => { const env = { ...process.env }; env.NODE_OPTIONS = '--dns-result-order=ipv4first --trace-deprecation'; childProcess = spawn( @@ -315,7 +315,7 @@ describe('execution', () => { handleError(childProcess, done); }); - it_id('23caddd7-bfea-4869-8bd4-0f2cd283c8bd', 'can start Parse Server with auth via CLI', done => { + it_id('23caddd7-bfea-4869-8bd4-0f2cd283c8bd')(it)('can start Parse Server with auth via CLI', done => { const env = { ...process.env }; env.NODE_OPTIONS = '--dns-result-order=ipv4first --trace-deprecation'; childProcess = spawn( diff --git a/spec/CloudCode.spec.js b/spec/CloudCode.spec.js index 7dbec67d60..ea862b3fe9 100644 --- a/spec/CloudCode.spec.js +++ b/spec/CloudCode.spec.js @@ -2317,7 +2317,7 @@ describe('beforeFind hooks', () => { ); }); - it_id('6ef0d226-af30-4dfd-8306-972a1b4becd3', 'should handle empty where', done => { + it_id('6ef0d226-af30-4dfd-8306-972a1b4becd3')(it)('should handle empty where', done => { Parse.Cloud.beforeFind('MyObject', req => { const otherQuery = new Parse.Query('MyObject'); otherQuery.equalTo('some', true); @@ -2919,7 +2919,7 @@ describe('afterFind hooks', () => { }).toThrow('Only the _Session class is allowed for the afterLogout trigger.'); }); - it_id('c16159b5-e8ee-42d5-8fe3-e2f7c006881d', 'should skip afterFind hooks for aggregate', done => { + it_id('c16159b5-e8ee-42d5-8fe3-e2f7c006881d')(it)('should skip afterFind hooks for aggregate', done => { const hook = { method: function () { return Promise.reject(); @@ -2946,7 +2946,7 @@ describe('afterFind hooks', () => { }); }); - it_id('ca55c90d-36db-422c-9060-a30583ce5224', 'should skip afterFind hooks for distinct', done => { + it_id('ca55c90d-36db-422c-9060-a30583ce5224')(it)('should skip afterFind hooks for distinct', done => { const hook = { method: function () { return Promise.reject(); @@ -3033,7 +3033,7 @@ describe('afterFind hooks', () => { expect(calledAfter).toBe(false); }); - it_id('55ef1741-cf72-4a7c-a029-00cb75f53233', 'should expose context in beforeSave/afterSave via header', async () => { + it_id('55ef1741-cf72-4a7c-a029-00cb75f53233')(it)('should expose context in beforeSave/afterSave via header', async () => { let calledBefore = false; let calledAfter = false; Parse.Cloud.beforeSave('TestObject', req => { @@ -3347,7 +3347,7 @@ describe('beforeLogin hook', () => { expect(response).toEqual(error); }); - it_id('5656d6d7-65ef-43d1-8ca6-6942ae3614d5', 'should have expected data in request in beforeLogin', async done => { + it_id('5656d6d7-65ef-43d1-8ca6-6942ae3614d5')(it)('should have expected data in request in beforeLogin', async done => { Parse.Cloud.beforeLogin(req => { expect(req.object).toBeDefined(); expect(req.user).toBeUndefined(); @@ -3464,7 +3464,7 @@ describe('afterLogin hook', () => { done(); }); - it_id('e86155c4-62e1-4c6e-ab4a-9ac6c87c60f2')('should have expected data in request in afterLogin', async done => { + it_id('e86155c4-62e1-4c6e-ab4a-9ac6c87c60f2')(it)('should have expected data in request in afterLogin', async done => { Parse.Cloud.afterLogin(req => { expect(req.object).toBeDefined(); expect(req.user).toBeDefined(); diff --git a/spec/CloudCodeLogger.spec.js b/spec/CloudCodeLogger.spec.js index 180e56d6f0..c5cb1bb1b9 100644 --- a/spec/CloudCodeLogger.spec.js +++ b/spec/CloudCodeLogger.spec.js @@ -37,7 +37,7 @@ describe('Cloud Code Logger', () => { // Note that helpers takes care of logout. // see helpers.js:afterEach - it_id('02d53b97-3ec7-46fb-abb6-176fd6e85590')('should expose log to functions', () => { + it_id('02d53b97-3ec7-46fb-abb6-176fd6e85590')(it)('should expose log to functions', () => { const spy = spyOn(Config.get('test').loggerController, 'log').and.callThrough(); Parse.Cloud.define('loggerTest', req => { req.log.info('logTest', 'info log', { info: 'some log' }); @@ -67,7 +67,7 @@ describe('Cloud Code Logger', () => { }); }); - it_id('768412f5-d32f-4134-89a6-08949781a6c0')('trigger should obfuscate password', done => { + it_id('768412f5-d32f-4134-89a6-08949781a6c0')(it)('trigger should obfuscate password', done => { Parse.Cloud.beforeSave(Parse.User, req => { return req.object; }); @@ -82,7 +82,7 @@ describe('Cloud Code Logger', () => { .then(null, e => done.fail(e)); }); - it_id('3c394047-272e-4728-9d02-9eaa660d2ed2')('should expose log to trigger', done => { + it_id('3c394047-272e-4728-9d02-9eaa660d2ed2')(it)('should expose log to trigger', done => { Parse.Cloud.beforeSave('MyObject', req => { req.log.info('beforeSave MyObject', 'info log', { info: 'some log' }); req.log.error('beforeSave MyObject', 'error log', { @@ -120,7 +120,7 @@ describe('Cloud Code Logger', () => { expect(truncatedString.length).toBe(1015); // truncate length + the string '... (truncated)' }); - it_id('4a009b1f-9203-49ca-8d48-5b45f4eedbdf')('should truncate input and result of long lines', done => { + it_id('4a009b1f-9203-49ca-8d48-5b45f4eedbdf')(it)('should truncate input and result of long lines', done => { const longString = fs.readFileSync(loremFile, 'utf8'); Parse.Cloud.define('aFunction', req => { return req.params; @@ -138,7 +138,7 @@ describe('Cloud Code Logger', () => { .then(null, e => done.fail(e)); }); - it_id('9857e15d-bb18-478d-8a67-fdaad3e89565')('should log an afterSave', done => { + it_id('9857e15d-bb18-478d-8a67-fdaad3e89565')(it)('should log an afterSave', done => { Parse.Cloud.afterSave('MyObject', () => {}); new Parse.Object('MyObject') .save() @@ -151,7 +151,7 @@ describe('Cloud Code Logger', () => { .then(null, e => done.fail(e)); }); - it_id('ec13a296-f8b1-4fc6-985a-3593462edd9c')('should log a denied beforeSave', done => { + it_id('ec13a296-f8b1-4fc6-985a-3593462edd9c')(it)('should log a denied beforeSave', done => { Parse.Cloud.beforeSave('MyObject', () => { throw 'uh oh!'; }); @@ -174,7 +174,7 @@ describe('Cloud Code Logger', () => { }); }); - it_id('3e0caa45-60d6-41af-829a-fd389710c132')('should log cloud function success', done => { + it_id('3e0caa45-60d6-41af-829a-fd389710c132')(it)('should log cloud function success', done => { Parse.Cloud.define('aFunction', () => { return 'it worked!'; }); @@ -189,7 +189,7 @@ describe('Cloud Code Logger', () => { }); }); - it_id('8088de8a-7cba-4035-8b05-4a903307e674')('should log cloud function execution using the custom log level', async done => { + it_id('8088de8a-7cba-4035-8b05-4a903307e674')(it)('should log cloud function execution using the custom log level', async done => { Parse.Cloud.define('aFunction', () => { return 'it worked!'; }); @@ -260,7 +260,7 @@ describe('Cloud Code Logger', () => { expect(calls).toEqual({ beforeSave: 'warn', afterSave: undefined }); }); - it_id('97e0eafa-cde6-4a9a-9e53-7db98bacbc62')('should log cloud function failure', done => { + it_id('97e0eafa-cde6-4a9a-9e53-7db98bacbc62')(it)('should log cloud function failure', done => { Parse.Cloud.define('aFunction', () => { throw 'it failed!'; }); @@ -311,7 +311,7 @@ describe('Cloud Code Logger', () => { .then(null, e => done.fail(JSON.stringify(e))); }).pend('needs more work.....'); - it_id('b86e8168-8370-4730-a4ba-24ca3016ad66')('cloud function should obfuscate password', done => { + it_id('b86e8168-8370-4730-a4ba-24ca3016ad66')(it)('cloud function should obfuscate password', done => { Parse.Cloud.define('testFunction', () => { return 'verify code success'; }); diff --git a/spec/DefinedSchemas.spec.js b/spec/DefinedSchemas.spec.js index 0e560b810e..e3d6fd51fe 100644 --- a/spec/DefinedSchemas.spec.js +++ b/spec/DefinedSchemas.spec.js @@ -643,7 +643,7 @@ describe('DefinedSchemas', () => { expect(logger.error).toHaveBeenCalledWith(`Failed to run migrations: ${error.toString()}`); }); - it_id('a18bf4f2-25c8-4de3-b986-19cb1ab163b8')('should perform migration in parallel without failing', async () => { + it_id('a18bf4f2-25c8-4de3-b986-19cb1ab163b8')(it)('should perform migration in parallel without failing', async () => { const server = await reconfigureServer(); const logger = require('../lib/logger').logger; spyOn(logger, 'error').and.callThrough(); diff --git a/spec/EmailVerificationToken.spec.js b/spec/EmailVerificationToken.spec.js index 970806fde2..4ebd00c453 100644 --- a/spec/EmailVerificationToken.spec.js +++ b/spec/EmailVerificationToken.spec.js @@ -104,7 +104,7 @@ describe('Email Verification Token Expiration: ', () => { }); }); - it_id('f20dd3c2-87d9-4bc6-a51d-4ea2834acbcc')('if user clicks on the email verify link before email verification token expiration then show the verify email success page', done => { + it_id('f20dd3c2-87d9-4bc6-a51d-4ea2834acbcc')(it)('if user clicks on the email verify link before email verification token expiration then show the verify email success page', done => { const user = new Parse.User(); let sendEmailOptions; const emailAdapter = { @@ -146,7 +146,7 @@ describe('Email Verification Token Expiration: ', () => { }); }); - it_id('94956799-c85e-4297-b879-e2d1f985394c')('if user clicks on the email verify link before email verification token expiration then emailVerified should be true', done => { + it_id('94956799-c85e-4297-b879-e2d1f985394c')(it)('if user clicks on the email verify link before email verification token expiration then emailVerified should be true', done => { const user = new Parse.User(); let sendEmailOptions; const emailAdapter = { @@ -194,7 +194,7 @@ describe('Email Verification Token Expiration: ', () => { }); }); - it_id('25f3f895-c987-431c-9841-17cb6aaf18b5')('if user clicks on the email verify link before email verification token expiration then user should be able to login', done => { + it_id('25f3f895-c987-431c-9841-17cb6aaf18b5')(it)('if user clicks on the email verify link before email verification token expiration then user should be able to login', done => { const user = new Parse.User(); let sendEmailOptions; const emailAdapter = { @@ -242,7 +242,7 @@ describe('Email Verification Token Expiration: ', () => { }); }); - it_id('c6a3e188-9065-4f50-842d-454d1e82f289')('sets the _email_verify_token_expires_at and _email_verify_token fields after user SignUp', done => { + it_id('c6a3e188-9065-4f50-842d-454d1e82f289')(it)('sets the _email_verify_token_expires_at and _email_verify_token fields after user SignUp', done => { const user = new Parse.User(); let sendEmailOptions; const emailAdapter = { @@ -292,7 +292,7 @@ describe('Email Verification Token Expiration: ', () => { }); }); - it_id('9365c53c-b8b4-41f7-a3c1-77882f76a89c')('can conditionally send emails', async () => { + it_id('9365c53c-b8b4-41f7-a3c1-77882f76a89c')(it)('can conditionally send emails', async () => { let sendEmailOptions; const emailAdapter = { sendVerificationEmail: options => { @@ -351,7 +351,7 @@ describe('Email Verification Token Expiration: ', () => { expect(verifySpy).toHaveBeenCalled(); }); - it_id('b3549300-bed7-4a5e-bed5-792dbfead960')('can conditionally send emails and allow conditional login', async () => { + it_id('b3549300-bed7-4a5e-bed5-792dbfead960')(it)('can conditionally send emails and allow conditional login', async () => { let sendEmailOptions; const emailAdapter = { sendVerificationEmail: options => { @@ -397,7 +397,7 @@ describe('Email Verification Token Expiration: ', () => { expect(verifySpy).toHaveBeenCalledTimes(5); }); - it_id('d812de87-33d1-495e-a6e8-3485f6dc3589')('can conditionally send user email verification', async () => { + it_id('d812de87-33d1-495e-a6e8-3485f6dc3589')(it)('can conditionally send user email verification', async () => { const emailAdapter = { sendVerificationEmail: () => {}, sendPasswordResetEmail: () => Promise.resolve(), @@ -467,7 +467,7 @@ describe('Email Verification Token Expiration: ', () => { await user.save(null, { useMasterKey: true }); }); - it_id('a8c1f820-822f-4a37-9d08-a968cac8369d')('beforeSave options do not change existing behaviour', async () => { + it_id('a8c1f820-822f-4a37-9d08-a968cac8369d')(it)('beforeSave options do not change existing behaviour', async () => { let sendEmailOptions; const emailAdapter = { sendVerificationEmail: options => { @@ -509,7 +509,7 @@ describe('Email Verification Token Expiration: ', () => { expect(emailSpy).toHaveBeenCalled(); }); - it_id('36d277eb-ec7c-4a39-9108-435b68228741')('unsets the _email_verify_token_expires_at and _email_verify_token fields in the User class if email verification is successful', done => { + it_id('36d277eb-ec7c-4a39-9108-435b68228741')(it)('unsets the _email_verify_token_expires_at and _email_verify_token fields in the User class if email verification is successful', done => { const user = new Parse.User(); let sendEmailOptions; const emailAdapter = { @@ -567,7 +567,7 @@ describe('Email Verification Token Expiration: ', () => { }); }); - it_id('4f444704-ec4b-4dff-b947-614b1c6971c4')('clicking on the email verify link by an email VERIFIED user that was setup before enabling the expire email verify token should show email verify email success', done => { + it_id('4f444704-ec4b-4dff-b947-614b1c6971c4')(it)('clicking on the email verify link by an email VERIFIED user that was setup before enabling the expire email verify token should show email verify email success', done => { const user = new Parse.User(); let sendEmailOptions; const emailAdapter = { @@ -755,7 +755,7 @@ describe('Email Verification Token Expiration: ', () => { }); }); - it_id('28f2140d-48bd-44ac-a141-ba60ea8d9713')('should send a new verification email when a resend is requested and the user is UNVERIFIED', done => { + it_id('28f2140d-48bd-44ac-a141-ba60ea8d9713')(it)('should send a new verification email when a resend is requested and the user is UNVERIFIED', done => { const user = new Parse.User(); let sendEmailOptions; let sendVerificationEmailCallCount = 0; @@ -916,7 +916,7 @@ describe('Email Verification Token Expiration: ', () => { done(); }); - it_id('0e66b7f6-2c07-4117-a8b9-605aa31a1e29')('should match codes with emailVerifyTokenReuseIfValid', async done => { + it_id('0e66b7f6-2c07-4117-a8b9-605aa31a1e29')(it)('should match codes with emailVerifyTokenReuseIfValid', async done => { let sendEmailOptions; let sendVerificationEmailCallCount = 0; const emailAdapter = { @@ -982,7 +982,7 @@ describe('Email Verification Token Expiration: ', () => { done(); }); - it_id('1ed9a6c2-bebc-4813-af30-4f4a212544c2')('should not send a new verification email when a resend is requested and the user is VERIFIED', done => { + it_id('1ed9a6c2-bebc-4813-af30-4f4a212544c2')(it)('should not send a new verification email when a resend is requested and the user is VERIFIED', done => { const user = new Parse.User(); let sendEmailOptions; let sendVerificationEmailCallCount = 0; @@ -1223,7 +1223,7 @@ describe('Email Verification Token Expiration: ', () => { }); }); - it_id('b082d387-4974-4d45-a0d9-0c85ca2d7cbf')('emailVerified should be set to false after changing from an already verified email', done => { + it_id('b082d387-4974-4d45-a0d9-0c85ca2d7cbf')(it)('emailVerified should be set to false after changing from an already verified email', done => { const user = new Parse.User(); let sendEmailOptions; const emailAdapter = { diff --git a/spec/Idempotency.spec.js b/spec/Idempotency.spec.js index c8de6a3738..14d0469b86 100644 --- a/spec/Idempotency.spec.js +++ b/spec/Idempotency.spec.js @@ -50,7 +50,7 @@ describe('Idempotency', () => { }); // Tests - it_id('e25955fd-92eb-4b22-b8b7-38980e5cb223')('should enforce idempotency for cloud code function', async () => { + it_id('e25955fd-92eb-4b22-b8b7-38980e5cb223')(it)('should enforce idempotency for cloud code function', async () => { let counter = 0; Parse.Cloud.define('myFunction', () => { counter++; @@ -73,7 +73,7 @@ describe('Idempotency', () => { expect(counter).toBe(1); }); - it_id('be2fbe16-8178-485e-9a12-6fb541096480')('should delete request entry after TTL', async () => { + it_id('be2fbe16-8178-485e-9a12-6fb541096480')(it)('should delete request entry after TTL', async () => { let counter = 0; Parse.Cloud.define('myFunction', () => { counter++; @@ -123,7 +123,7 @@ describe('Idempotency', () => { } ); - it_id('e976d0cc-a57f-45d4-9472-b9b052db6490')('should enforce idempotency for cloud code jobs', async () => { + it_id('e976d0cc-a57f-45d4-9472-b9b052db6490')(it)('should enforce idempotency for cloud code jobs', async () => { let counter = 0; Parse.Cloud.job('myJob', () => { counter++; @@ -145,7 +145,7 @@ describe('Idempotency', () => { expect(counter).toBe(1); }); - it_id('7c84a3d4-e1b6-4a0d-99f1-af3cf1a6b3d8')('should enforce idempotency for class object creation', async () => { + it_id('7c84a3d4-e1b6-4a0d-99f1-af3cf1a6b3d8')(it)('should enforce idempotency for class object creation', async () => { let counter = 0; Parse.Cloud.afterSave('MyClass', () => { counter++; @@ -167,7 +167,7 @@ describe('Idempotency', () => { expect(counter).toBe(1); }); - it_id('a030f2dd-5d21-46ac-b53d-9d714f35d72a')('should enforce idempotency for user object creation', async () => { + it_id('a030f2dd-5d21-46ac-b53d-9d714f35d72a')(it)('should enforce idempotency for user object creation', async () => { let counter = 0; Parse.Cloud.afterSave('_User', () => { counter++; @@ -193,7 +193,7 @@ describe('Idempotency', () => { expect(counter).toBe(1); }); - it_id('064c469b-091c-4ba9-9043-be461f26a3eb')('should enforce idempotency for installation object creation', async () => { + it_id('064c469b-091c-4ba9-9043-be461f26a3eb')(it)('should enforce idempotency for installation object creation', async () => { let counter = 0; Parse.Cloud.afterSave('_Installation', () => { counter++; @@ -219,7 +219,7 @@ describe('Idempotency', () => { expect(counter).toBe(1); }); - it_id('f11670b6-fa9c-4f21-a268-ae4b6bbff7fd')('should not interfere with calls of different request ID', async () => { + it_id('f11670b6-fa9c-4f21-a268-ae4b6bbff7fd')(it)('should not interfere with calls of different request ID', async () => { let counter = 0; Parse.Cloud.afterSave('MyClass', () => { counter++; @@ -240,7 +240,7 @@ describe('Idempotency', () => { expect(counter).toBe(100); }); - it_id('0ecd2cd2-dafb-4a2b-bb2b-9ad4c9aca777')('should re-throw any other error unchanged when writing request entry fails for any other reason', async () => { + it_id('0ecd2cd2-dafb-4a2b-bb2b-9ad4c9aca777')(it)('should re-throw any other error unchanged when writing request entry fails for any other reason', async () => { spyOn(rest, 'create').and.rejectWith(new Parse.Error(0, 'some other error')); Parse.Cloud.define('myFunction', () => {}); const params = { diff --git a/spec/LogsRouter.spec.js b/spec/LogsRouter.spec.js index 38789216c0..b25ac25be5 100644 --- a/spec/LogsRouter.spec.js +++ b/spec/LogsRouter.spec.js @@ -75,7 +75,7 @@ describe_only(() => { /** * Verifies simple passwords in GET login requests with special characters are scrubbed from the verbose log */ - it_id('e36d6141-2a20-41d0-85fc-d1534c3e4bae')('does scrub simple passwords on GET login', done => { + it_id('e36d6141-2a20-41d0-85fc-d1534c3e4bae')(it)('does scrub simple passwords on GET login', done => { reconfigureServer({ verbose: true, }).then(function () { @@ -105,7 +105,7 @@ describe_only(() => { /** * Verifies complex passwords in GET login requests with special characters are scrubbed from the verbose log */ - it_id('24b277c5-250f-4a35-a449-2c8c519d4c03')('does scrub complex passwords on GET login', done => { + it_id('24b277c5-250f-4a35-a449-2c8c519d4c03')(it)('does scrub complex passwords on GET login', done => { reconfigureServer({ verbose: true, }) @@ -139,7 +139,7 @@ describe_only(() => { /** * Verifies fields in POST login requests are NOT present in the verbose log */ - it_id('33143ec9-b32d-467c-ba65-ff2bbefdaadd')('does not have password field in POST login', done => { + it_id('33143ec9-b32d-467c-ba65-ff2bbefdaadd')(it)('does not have password field in POST login', done => { reconfigureServer({ verbose: true, }).then(function () { diff --git a/spec/Middlewares.spec.js b/spec/Middlewares.spec.js index e5bba7a88b..c0fcb659e5 100644 --- a/spec/Middlewares.spec.js +++ b/spec/Middlewares.spec.js @@ -32,7 +32,7 @@ describe('middlewares', () => { AppCache.del(fakeReq.body._ApplicationId); }); - it_id('4cc18d90-1763-4725-97fa-f63fb4692fc4')('should use _ContentType if provided', done => { + it_id('4cc18d90-1763-4725-97fa-f63fb4692fc4')(it)('should use _ContentType if provided', done => { AppCachePut(fakeReq.body._ApplicationId, { masterKeyIps: ['127.0.0.1'], }); @@ -128,7 +128,7 @@ describe('middlewares', () => { const otherKeys = BodyKeys.filter( otherKey => otherKey !== infoKey && otherKey !== 'javascriptKey' ); - it_id('f9abd7ac-b1f4-4607-b9b0-365ff0559d84')(`it should pull ${bodyKey} into req.info`, done => { + it_id('f9abd7ac-b1f4-4607-b9b0-365ff0559d84')(it)(`it should pull ${bodyKey} into req.info`, done => { AppCachePut(fakeReq.body._ApplicationId, { masterKeyIps: ['0.0.0.0/0'], }); @@ -147,7 +147,7 @@ describe('middlewares', () => { }); }); - it_id('4a0bce41-c536-4482-a873-12ed023380e2')('should not succeed and log if the ip does not belong to masterKeyIps list', async () => { + it_id('4a0bce41-c536-4482-a873-12ed023380e2')(it)('should not succeed and log if the ip does not belong to masterKeyIps list', async () => { const logger = require('../lib/logger').logger; spyOn(logger, 'error').and.callFake(() => {}); AppCachePut(fakeReq.body._ApplicationId, { @@ -197,7 +197,7 @@ describe('middlewares', () => { ); }); - it_id('2f7fadec-a87c-4626-90d1-65c75653aea9')('should succeed if the ip does belong to masterKeyIps list', async () => { + it_id('2f7fadec-a87c-4626-90d1-65c75653aea9')(it)('should succeed if the ip does belong to masterKeyIps list', async () => { AppCachePut(fakeReq.body._ApplicationId, { masterKey: 'masterKey', masterKeyIps: ['10.0.0.1'], @@ -208,7 +208,7 @@ describe('middlewares', () => { expect(fakeReq.auth.isMaster).toBe(true); }); - it_id('2b251fd4-d43c-48f4-ada9-c8458e40c12a')('should allow any ip to use masterKey if masterKeyIps is empty', async () => { + it_id('2b251fd4-d43c-48f4-ada9-c8458e40c12a')(it)('should allow any ip to use masterKey if masterKeyIps is empty', async () => { AppCachePut(fakeReq.body._ApplicationId, { masterKey: 'masterKey', masterKeyIps: ['0.0.0.0/0'], diff --git a/spec/PagesRouter.spec.js b/spec/PagesRouter.spec.js index 6f337288a0..ca61fa4f5a 100644 --- a/spec/PagesRouter.spec.js +++ b/spec/PagesRouter.spec.js @@ -738,7 +738,7 @@ describe('Pages Router', () => { ); }); - it_id('2845c2ea-23ba-45d2-a33f-63181d419bca')('localizes end-to-end for verify email: success', async () => { + it_id('2845c2ea-23ba-45d2-a33f-63181d419bca')(it)('localizes end-to-end for verify email: success', async () => { await reconfigureServer(config); const sendVerificationEmail = spyOn( config.emailAdapter, @@ -767,7 +767,7 @@ describe('Pages Router', () => { ); }); - it_id('f2272b94-b4ac-474f-8e47-1ca74de136f5')('localizes end-to-end for verify email: invalid verification link - link send success', async () => { + it_id('f2272b94-b4ac-474f-8e47-1ca74de136f5')(it)('localizes end-to-end for verify email: invalid verification link - link send success', async () => { await reconfigureServer(config); const sendVerificationEmail = spyOn( config.emailAdapter, @@ -821,7 +821,7 @@ describe('Pages Router', () => { ); }); - it_id('1d46d36a-e455-4ae7-8717-e0d286e95f02')('localizes end-to-end for verify email: invalid verification link - link send fail', async () => { + it_id('1d46d36a-e455-4ae7-8717-e0d286e95f02')(it)('localizes end-to-end for verify email: invalid verification link - link send fail', async () => { await reconfigureServer(config); const sendVerificationEmail = spyOn( config.emailAdapter, @@ -1183,7 +1183,7 @@ describe('Pages Router', () => { ); }); - it_id('81c1c28e-5dfd-4ffb-a09b-283156c08483')('email verification works with custom endpoint', async () => { + it_id('81c1c28e-5dfd-4ffb-a09b-283156c08483')(it)('email verification works with custom endpoint', async () => { config.pages.pagesEndpoint = 'customEndpoint'; await reconfigureServer(config); const sendVerificationEmail = spyOn( diff --git a/spec/Parse.Push.spec.js b/spec/Parse.Push.spec.js index ce86ed198b..6303496de1 100644 --- a/spec/Parse.Push.spec.js +++ b/spec/Parse.Push.spec.js @@ -111,7 +111,7 @@ const setup = function () { }; describe('Parse.Push', () => { - it_id('d1e591c4-2b21-466b-9ee2-5be467b6b771')('should properly send push', async () => { + it_id('d1e591c4-2b21-466b-9ee2-5be467b6b771')(it)('should properly send push', async () => { const { sendToInstallationSpy } = await setup(); const pushStatusId = await Parse.Push.send({ where: { @@ -126,7 +126,7 @@ describe('Parse.Push', () => { expect(sendToInstallationSpy.calls.count()).toEqual(10); }); - it_id('2a58e3c7-b6f3-4261-a384-6c893b2ac3f3')('should properly send push with lowercaseIncrement', async () => { + it_id('2a58e3c7-b6f3-4261-a384-6c893b2ac3f3')(it)('should properly send push with lowercaseIncrement', async () => { await setup(); const pushStatusId = await Parse.Push.send({ where: { @@ -140,7 +140,7 @@ describe('Parse.Push', () => { await pushCompleted(pushStatusId); }); - it_id('e21780b6-2cdd-467e-8013-81030f3288e9')('should not allow clients to query _PushStatus', async () => { + it_id('e21780b6-2cdd-467e-8013-81030f3288e9')(it)('should not allow clients to query _PushStatus', async () => { await setup(); const pushStatusId = await Parse.Push.send({ where: { @@ -166,7 +166,7 @@ describe('Parse.Push', () => { } }); - it_id('924cf5f5-f684-4925-978a-e52c0c457366')('should allow master key to query _PushStatus', async () => { + it_id('924cf5f5-f684-4925-978a-e52c0c457366')(it)('should allow master key to query _PushStatus', async () => { await setup(); const pushStatusId = await Parse.Push.send({ where: { diff --git a/spec/ParseAPI.spec.js b/spec/ParseAPI.spec.js index 9453262908..a178a1b863 100644 --- a/spec/ParseAPI.spec.js +++ b/spec/ParseAPI.spec.js @@ -163,7 +163,7 @@ describe('miscellaneous', function () { expect(numCreated).toBe(1); }); - it_id('be1b9ac7-5e5f-4e91-b044-2bd8fb7622ad')('ensure that if people already have duplicate users, they can still sign up new users', async done => { + it_id('be1b9ac7-5e5f-4e91-b044-2bd8fb7622ad')(it)('ensure that if people already have duplicate users, they can still sign up new users', async done => { try { await Parse.User.logOut(); } catch (e) { @@ -209,7 +209,7 @@ describe('miscellaneous', function () { }); }); - it_id('d00f907e-41b9-40f6-8168-63e832199a8c')('ensure that if people already have duplicate emails, they can still sign up new users', done => { + it_id('d00f907e-41b9-40f6-8168-63e832199a8c')(it)('ensure that if people already have duplicate emails, they can still sign up new users', done => { const config = Config.get('test'); // Remove existing data to clear out unique index TestUtils.destroyAllDataPermanently() @@ -289,7 +289,7 @@ describe('miscellaneous', function () { }, fail); }); - it_id('33db6efe-7c02-496c-8595-0ef627a94103')('increment with a user object', function (done) { + it_id('33db6efe-7c02-496c-8595-0ef627a94103')(it)('increment with a user object', function (done) { createTestUser() .then(user => { user.increment('foo'); @@ -317,7 +317,7 @@ describe('miscellaneous', function () { ); }); - it_id('bef99522-bcfd-4f79-ba9e-3c3845550401')('save various data types', function (done) { + it_id('bef99522-bcfd-4f79-ba9e-3c3845550401')(it)('save various data types', function (done) { const obj = new TestObject(); obj.set('date', new Date()); obj.set('array', [1, 2, 3]); @@ -951,7 +951,7 @@ describe('miscellaneous', function () { ); }); - it_id('e9e718a9-4465-4158-b13e-f146855a8892')('return the updated fields on PUT', async () => { + it_id('e9e718a9-4465-4158-b13e-f146855a8892')(it)('return the updated fields on PUT', async () => { const obj = new Parse.Object('GameScore'); const pointer = new Parse.Object('Child'); await pointer.save(); @@ -1023,7 +1023,7 @@ describe('miscellaneous', function () { expect(body.updatedAt).not.toBeUndefined(); }); - it_id('ea358b59-03c0-45c9-abc7-1fdd67573029')('should response should not change with triggers', async () => { + it_id('ea358b59-03c0-45c9-abc7-1fdd67573029')(it)('should response should not change with triggers', async () => { const obj = new Parse.Object('GameScore'); const pointer = new Parse.Object('Child'); Parse.Cloud.beforeSave('GameScore', request => { @@ -1491,7 +1491,7 @@ describe('miscellaneous', function () { }); }); - it_id('b2cd9cf2-13fa-4acd-aaa9-6f81fc1858db')('properly returns incremented values (#1554)', done => { + it_id('b2cd9cf2-13fa-4acd-aaa9-6f81fc1858db')(it)('properly returns incremented values (#1554)', done => { const headers = { 'Content-Type': 'application/json', 'X-Parse-Application-Id': 'test', @@ -1680,7 +1680,7 @@ describe('miscellaneous', function () { }); }); - it_id('8f99ee20-3da7-45ec-b867-ea0eb87524a9')('purge all objects in class', done => { + it_id('8f99ee20-3da7-45ec-b867-ea0eb87524a9')(it)('purge all objects in class', done => { const object = new Parse.Object('TestObject'); object.set('foo', 'bar'); const object2 = new Parse.Object('TestObject'); diff --git a/spec/ParseGeoPoint.spec.js b/spec/ParseGeoPoint.spec.js index 25750ad0d3..f154f0048e 100644 --- a/spec/ParseGeoPoint.spec.js +++ b/spec/ParseGeoPoint.spec.js @@ -93,7 +93,7 @@ describe('Parse.GeoPoint testing', () => { ); }); - it_id('bbd9e2f6-7f61-458f-98f2-4a563586cd8d')('geo line', async done => { + it_id('bbd9e2f6-7f61-458f-98f2-4a563586cd8d')(it)('geo line', async done => { const line = []; for (let i = 0; i < 10; ++i) { const obj = new TestObject(); @@ -143,7 +143,7 @@ describe('Parse.GeoPoint testing', () => { ); }); - it_id('e1e86b38-b8a4-4109-8330-a324fe628e0c')('geo max distance medium', async () => { + it_id('e1e86b38-b8a4-4109-8330-a324fe628e0c')(it)('geo max distance medium', async () => { const objects = []; [0, 1, 2].map(function (i) { const obj = new TestObject(); @@ -207,7 +207,7 @@ describe('Parse.GeoPoint testing', () => { done(); }); - it_id('05f1a454-56b1-4f2e-908e-408a9222cbae')('geo max distance in km california', async () => { + it_id('05f1a454-56b1-4f2e-908e-408a9222cbae')(it)('geo max distance in km california', async () => { await makeSomeGeoPoints(); const sfo = new Parse.GeoPoint(37.6189722, -122.3748889); const query = new Parse.Query(TestObject); @@ -246,7 +246,7 @@ describe('Parse.GeoPoint testing', () => { equal(results.length, 3); }); - it_id('9ee376ad-dd6c-4c17-ad28-c7899a4411f1')('geo max distance in miles california', async () => { + it_id('9ee376ad-dd6c-4c17-ad28-c7899a4411f1')(it)('geo max distance in miles california', async () => { await makeSomeGeoPoints(); const sfo = new Parse.GeoPoint(37.6189722, -122.3748889); const query = new Parse.Query(TestObject); @@ -276,7 +276,7 @@ describe('Parse.GeoPoint testing', () => { equal(results.length, 0); }); - it_id('9e35a89e-bc2c-4ec5-b25a-8d1890a55233')('returns nearest location', async () => { + it_id('9e35a89e-bc2c-4ec5-b25a-8d1890a55233')(it)('returns nearest location', async () => { await makeSomeGeoPoints(); const sfo = new Parse.GeoPoint(37.6189722, -122.3748889); const query = new Parse.Query(TestObject); @@ -286,7 +286,7 @@ describe('Parse.GeoPoint testing', () => { equal(results[1].get('name'), 'Sacramento'); }); - it_id('6df434b0-142d-4302-bbc6-a6ec5a9d9c68')('works with geobox queries', done => { + it_id('6df434b0-142d-4302-bbc6-a6ec5a9d9c68')(it)('works with geobox queries', done => { const inbound = new Parse.GeoPoint(1.5, 1.5); const onbound = new Parse.GeoPoint(10, 10); const outbound = new Parse.GeoPoint(20, 20); @@ -356,7 +356,7 @@ describe('Parse.GeoPoint testing', () => { }); }); - it_id('d9fbc5c6-f767-47d6-bb44-3858eb9df15a')('supports withinPolygon open path', done => { + it_id('d9fbc5c6-f767-47d6-bb44-3858eb9df15a')(it)('supports withinPolygon open path', done => { const inbound = new Parse.GeoPoint(1.5, 1.5); const onbound = new Parse.GeoPoint(10, 10); const outbound = new Parse.GeoPoint(20, 20); @@ -394,7 +394,7 @@ describe('Parse.GeoPoint testing', () => { }, done.fail); }); - it_id('3ec537bd-839a-4c93-a48b-b4a249820074')('supports withinPolygon closed path', done => { + it_id('3ec537bd-839a-4c93-a48b-b4a249820074')(it)('supports withinPolygon closed path', done => { const inbound = new Parse.GeoPoint(1.5, 1.5); const onbound = new Parse.GeoPoint(10, 10); const outbound = new Parse.GeoPoint(20, 20); @@ -433,7 +433,7 @@ describe('Parse.GeoPoint testing', () => { }, done.fail); }); - it_id('0a248e11-3598-480a-9ab5-8a0b259258e4')('supports withinPolygon Polygon object', done => { + it_id('0a248e11-3598-480a-9ab5-8a0b259258e4')(it)('supports withinPolygon Polygon object', done => { const inbound = new Parse.GeoPoint(1.5, 1.5); const onbound = new Parse.GeoPoint(10, 10); const outbound = new Parse.GeoPoint(20, 20); @@ -752,7 +752,7 @@ describe('Parse.GeoPoint testing', () => { equal(count, 1); }); - it_id('0b073d31-0d41-41e7-bd60-f636ffb759dc')('withinKilometers complex supports count', async () => { + it_id('0b073d31-0d41-41e7-bd60-f636ffb759dc')(it)('withinKilometers complex supports count', async () => { const inside = new Parse.GeoPoint(10, 10); const middle = new Parse.GeoPoint(20, 20); const outside = new Parse.GeoPoint(30, 30); @@ -770,7 +770,7 @@ describe('Parse.GeoPoint testing', () => { equal(count, 2); }); - it_id('26c9a13d-3d71-452e-a91c-9a4589be021c')('fails to fetch geopoints that are specifically not at (0,0)', async () => { + it_id('26c9a13d-3d71-452e-a91c-9a4589be021c')(it)('fails to fetch geopoints that are specifically not at (0,0)', async () => { const tmp = new TestObject({ location: new Parse.GeoPoint({ latitude: 0, longitude: 0 }), }); diff --git a/spec/ParseGlobalConfig.spec.js b/spec/ParseGlobalConfig.spec.js index f1c97cbdfc..0967a5a54a 100644 --- a/spec/ParseGlobalConfig.spec.js +++ b/spec/ParseGlobalConfig.spec.js @@ -185,7 +185,7 @@ describe('a GlobalConfig', () => { }); }); - it_id('5ebbd0cf-d1a5-49d9-aac7-5216abc5cb62')('properly handles delete op', done => { + it_id('5ebbd0cf-d1a5-49d9-aac7-5216abc5cb62')(it)('properly handles delete op', done => { request({ method: 'PUT', url: 'http://localhost:8378/1/config', diff --git a/spec/ParseGraphQLSchema.spec.js b/spec/ParseGraphQLSchema.spec.js index 656e979175..0b3d9a9007 100644 --- a/spec/ParseGraphQLSchema.spec.js +++ b/spec/ParseGraphQLSchema.spec.js @@ -500,7 +500,7 @@ describe('ParseGraphQLSchema', () => { }); }); describe('alias', () => { - it_id('45282d26-f4c7-4d2d-a7b6-cd8741d5322f')('Should be able to define alias for get and find query', async () => { + it_id('45282d26-f4c7-4d2d-a7b6-cd8741d5322f')(it)('Should be able to define alias for get and find query', async () => { const parseGraphQLSchema = new ParseGraphQLSchema({ databaseController, parseGraphQLController, @@ -535,7 +535,7 @@ describe('ParseGraphQLSchema', () => { expect(Object.keys(queries1)).toContain('precious_data'); }); - it_id('f04b46e3-a25d-401d-a315-3298cfee1df8')('Should be able to define alias for mutation', async () => { + it_id('f04b46e3-a25d-401d-a315-3298cfee1df8')(it)('Should be able to define alias for mutation', async () => { const parseGraphQLSchema = new ParseGraphQLSchema({ databaseController, parseGraphQLController, diff --git a/spec/ParseGraphQLServer.spec.js b/spec/ParseGraphQLServer.spec.js index eee3412fbb..b8c093d6fe 100644 --- a/spec/ParseGraphQLServer.spec.js +++ b/spec/ParseGraphQLServer.spec.js @@ -130,7 +130,7 @@ describe('ParseGraphQLServer', () => { set: () => {}, }; - it_id('0696675e-060f-414f-bc77-9d57f31807f5')('should return schema and context with req\'s info, config and auth', async () => { + it_id('0696675e-060f-414f-bc77-9d57f31807f5')(it)('should return schema and context with req\'s info, config and auth', async () => { const options = await parseGraphQLServer._getGraphQLOptions(); expect(options.schema).toEqual(parseGraphQLServer.parseGraphQLSchema.graphQLSchema); const contextResponse = await options.context({ req, res }); @@ -1395,7 +1395,7 @@ describe('ParseGraphQLServer', () => { await resetGraphQLCache(); }); - it_id('d6a23a2f-ca18-4b15-bc73-3e636f99e6bc')('should only include types in the enabledForClasses list', async () => { + it_id('d6a23a2f-ca18-4b15-bc73-3e636f99e6bc')(it)('should only include types in the enabledForClasses list', async () => { const schemaController = await parseServer.config.databaseController.loadSchema(); await schemaController.addClassIfNotExists('SuperCar', { foo: { type: 'String' }, @@ -1426,7 +1426,7 @@ describe('ParseGraphQLServer', () => { expect(data.userType).toBeNull(); expect(data.superCarType).toBeTruthy(); }); - it_id('1db2aceb-d24e-4929-ba43-8dbb5d0395e1')('should not include types in the disabledForClasses list', async () => { + it_id('1db2aceb-d24e-4929-ba43-8dbb5d0395e1')(it)('should not include types in the disabledForClasses list', async () => { const schemaController = await parseServer.config.databaseController.loadSchema(); await schemaController.addClassIfNotExists('SuperCar', { foo: { type: 'String' }, @@ -1457,7 +1457,7 @@ describe('ParseGraphQLServer', () => { expect(data.superCarType).toBeNull(); expect(data.userType).toBeTruthy(); }); - it_id('85c2e02f-0239-4819-b66e-392e0125f6c5')('should remove query operations when disabled', async () => { + it_id('85c2e02f-0239-4819-b66e-392e0125f6c5')(it)('should remove query operations when disabled', async () => { const superCar = new Parse.Object('SuperCar'); await superCar.save({ foo: 'bar' }); const customer = new Parse.Object('Customer'); @@ -1563,7 +1563,7 @@ describe('ParseGraphQLServer', () => { ).toBeRejected(); }); - it_id('972161a6-8108-4e99-a1a5-71d0267d26c2')('should remove mutation operations, create, update and delete, when disabled', async () => { + it_id('972161a6-8108-4e99-a1a5-71d0267d26c2')(it)('should remove mutation operations, create, update and delete, when disabled', async () => { const superCar1 = new Parse.Object('SuperCar'); await superCar1.save({ foo: 'bar' }); const customer1 = new Parse.Object('Customer'); @@ -1735,7 +1735,7 @@ describe('ParseGraphQLServer', () => { ).toBeRejected(); }); - it_id('4af763b1-ff86-43c7-ba30-060a1c07e730')('should only allow the supplied create and update fields for a class', async () => { + it_id('4af763b1-ff86-43c7-ba30-060a1c07e730')(it)('should only allow the supplied create and update fields for a class', async () => { const schemaController = await parseServer.config.databaseController.loadSchema(); await schemaController.addClassIfNotExists('SuperCar', { engine: { type: 'String' }, @@ -1823,7 +1823,7 @@ describe('ParseGraphQLServer', () => { expect(updatedSuperCar).toBeTruthy(); }); - it_id('fc9237e9-3e63-4b55-9c1d-e6269f613a93')('should handle required fields from the Parse class', async () => { + it_id('fc9237e9-3e63-4b55-9c1d-e6269f613a93')(it)('should handle required fields from the Parse class', async () => { const schemaController = await parseServer.config.databaseController.loadSchema(); await schemaController.addClassIfNotExists('SuperCar', { engine: { type: 'String', required: true }, @@ -1875,7 +1875,7 @@ describe('ParseGraphQLServer', () => { expect(__type2.fields.find(o => o.name === 'doors').type.kind).toEqual('NON_NULL'); }); - it_id('83b6895a-7dfd-4e3b-a5ce-acdb1fa39705')('should only allow the supplied output fields for a class', async () => { + it_id('83b6895a-7dfd-4e3b-a5ce-acdb1fa39705')(it)('should only allow the supplied output fields for a class', async () => { const schemaController = await parseServer.config.databaseController.loadSchema(); await schemaController.addClassIfNotExists('SuperCar', { @@ -1992,7 +1992,7 @@ describe('ParseGraphQLServer', () => { expect(getSuperCar.objectId).toBe(superCar.id); }); - it_id('67dfcf94-92fb-45a3-a012-3b22c81899ba')('should only allow the supplied constraint fields for a class', async () => { + it_id('67dfcf94-92fb-45a3-a012-3b22c81899ba')(it)('should only allow the supplied constraint fields for a class', async () => { try { const schemaController = await parseServer.config.databaseController.loadSchema(); @@ -2067,7 +2067,7 @@ describe('ParseGraphQLServer', () => { } }); - it_id('a3bdbd5d-8779-42fe-91a1-7a7f90a6177b')('should only allow the supplied sort fields for a class', async () => { + it_id('a3bdbd5d-8779-42fe-91a1-7a7f90a6177b')(it)('should only allow the supplied sort fields for a class', async () => { const schemaController = await parseServer.config.databaseController.loadSchema(); await schemaController.addClassIfNotExists('SuperCar', { @@ -4921,7 +4921,7 @@ describe('ParseGraphQLServer', () => { ).toEqual(['someValue1', 'someValue2']); }); - it_id('accc59be-fd13-46c5-a103-ec63f2ad6670')('should support full text search', async () => { + it_id('accc59be-fd13-46c5-a103-ec63f2ad6670')(it)('should support full text search', async () => { try { const obj = new Parse.Object('FullTextSearchTest'); obj.set('field1', 'Parse GraphQL Server'); @@ -5032,7 +5032,7 @@ describe('ParseGraphQLServer', () => { } }); - it_id('0fd03d3c-a2c8-4fac-95cc-2391a3032ca2')('should support order, skip and first arguments', async () => { + it_id('0fd03d3c-a2c8-4fac-95cc-2391a3032ca2')(it)('should support order, skip and first arguments', async () => { const promises = []; for (let i = 0; i < 100; i++) { const obj = new Parse.Object('SomeClass'); @@ -5079,7 +5079,7 @@ describe('ParseGraphQLServer', () => { ]); }); - it_id('588a70c6-2932-4d3b-a838-a74c59d8cffb')('should support pagination', async () => { + it_id('588a70c6-2932-4d3b-a838-a74c59d8cffb')(it)('should support pagination', async () => { const numberArray = (first, last) => { const array = []; for (let i = first; i <= last; i++) { @@ -5221,7 +5221,7 @@ describe('ParseGraphQLServer', () => { expect(result.data.someClasses.pageInfo.hasNextPage).toEqual(true); }); - it_id('4f6a5f20-9642-4cf0-b31d-e739672a9096')('should support count', async () => { + it_id('4f6a5f20-9642-4cf0-b31d-e739672a9096')(it)('should support count', async () => { await prepareData(); await parseGraphQLServer.parseGraphQLSchema.schemaCache.clear(); @@ -5324,7 +5324,7 @@ describe('ParseGraphQLServer', () => { expect(result.data.find.count).toEqual(2); }); - it_id('942b57be-ca8a-4a5b-8104-2adef8743b1a')('should respect max limit', async () => { + it_id('942b57be-ca8a-4a5b-8104-2adef8743b1a')(it)('should respect max limit', async () => { parseServer = await global.reconfigureServer({ maxLimit: 10, }); @@ -5365,7 +5365,7 @@ describe('ParseGraphQLServer', () => { expect(result.data.find.count).toEqual(100); }); - it_id('952634f0-0ad5-4a08-8da2-187c1bd9ee94')('should support keys argument', async () => { + it_id('952634f0-0ad5-4a08-8da2-187c1bd9ee94')(it)('should support keys argument', async () => { await prepareData(); await parseGraphQLServer.parseGraphQLSchema.schemaCache.clear(); @@ -5771,7 +5771,7 @@ describe('ParseGraphQLServer', () => { ).toEqual([object3.id, object1.id, object2.id]); }); - it_id('47a6adf3-1cb4-4d92-b74c-e480363f9cb5')('should support including relation', async () => { + it_id('47a6adf3-1cb4-4d92-b74c-e480363f9cb5')(it)('should support including relation', async () => { await prepareData(); await parseGraphQLServer.parseGraphQLSchema.schemaCache.clear(); @@ -6676,7 +6676,7 @@ describe('ParseGraphQLServer', () => { }); }); - it_id('f722e98e-1fd7-45c5-ade3-5177e3d542e8')('should unset fields when null used on update/create', async () => { + it_id('f722e98e-1fd7-45c5-ade3-5177e3d542e8')(it)('should unset fields when null used on update/create', async () => { const customerSchema = new Parse.Schema('Customer'); customerSchema.addString('aString'); customerSchema.addBoolean('aBoolean'); @@ -8320,7 +8320,7 @@ describe('ParseGraphQLServer', () => { expect(schema.fields.updatedAt.type).toEqual('Date'); }); - it_id('93e748f6-ad9b-4c31-8e1e-c5685e2382fb')('should support ACL', async () => { + it_id('93e748f6-ad9b-4c31-8e1e-c5685e2382fb')(it)('should support ACL', async () => { const someClass = new Parse.Object('SomeClass'); await someClass.save(); @@ -9074,7 +9074,7 @@ describe('ParseGraphQLServer', () => { expect(result2.companies.edges[0].node.objectId).toEqual(company1.id); }); - it_id('f4312f2c-90bb-4583-b033-02078ae0ce84')('should support relational where query', async () => { + it_id('f4312f2c-90bb-4583-b033-02078ae0ce84')(it)('should support relational where query', async () => { const president = new Parse.Object('President'); president.set('name', 'James'); await president.save(); @@ -10374,7 +10374,7 @@ describe('ParseGraphQLServer', () => { } }); - it_id('43303db7-c5a7-4bc0-91c3-57e03fffa225')('should support Bytes', async () => { + it_id('43303db7-c5a7-4bc0-91c3-57e03fffa225')(it)('should support Bytes', async () => { try { const someFieldValue = 'aGVsbG8gd29ybGQ='; @@ -10461,7 +10461,7 @@ describe('ParseGraphQLServer', () => { } }); - it_id('6a253e47-6959-4427-b841-c0c1fa77cf01')('should support Geo Points', async () => { + it_id('6a253e47-6959-4427-b841-c0c1fa77cf01')(it)('should support Geo Points', async () => { try { const someFieldValue = { __typename: 'GeoPoint', diff --git a/spec/ParseHooks.spec.js b/spec/ParseHooks.spec.js index 26cee92944..57205b1685 100644 --- a/spec/ParseHooks.spec.js +++ b/spec/ParseHooks.spec.js @@ -54,7 +54,7 @@ describe('Hooks', () => { ); }); - it_id('26c9a13d-3d71-452e-a91c-9a4589be021c')('should CRUD a function registration', done => { + it_id('26c9a13d-3d71-452e-a91c-9a4589be021c')(it)('should CRUD a function registration', done => { // Create Parse.Hooks.createFunction('My-Test-Function', 'http://someurl') .then(response => { @@ -98,7 +98,7 @@ describe('Hooks', () => { }); }); - it_id('7a81069e-2ee9-47fb-8e27-1120eda09e99')('should CRUD a trigger registration', done => { + it_id('7a81069e-2ee9-47fb-8e27-1120eda09e99')(it)('should CRUD a trigger registration', done => { // Create Parse.Hooks.createTrigger('MyClass', 'beforeDelete', 'http://someurl') .then( @@ -188,7 +188,7 @@ describe('Hooks', () => { }); }); - it_id('f7ad092f-81dc-4729-afd1-3b02db2f0948')('should fail trying to create two times the same function', done => { + it_id('f7ad092f-81dc-4729-afd1-3b02db2f0948')(it)('should fail trying to create two times the same function', done => { Parse.Hooks.createFunction('my_new_function', 'http://url.com') .then(() => jasmine.timeout()) .then( @@ -224,7 +224,7 @@ describe('Hooks', () => { ); }); - it_id('4db8c249-9174-4e8e-b959-55c8ea959a02')('should fail trying to create two times the same trigger', done => { + it_id('4db8c249-9174-4e8e-b959-55c8ea959a02')(it)('should fail trying to create two times the same trigger', done => { Parse.Hooks.createTrigger('MyClass', 'beforeSave', 'http://url.com') .then( () => { @@ -359,7 +359,7 @@ describe('Hooks', () => { }); }); - it_id('96d99414-b739-4e36-b3f4-8135e0be83ea')('should create hooks and properly preload them', done => { + it_id('96d99414-b739-4e36-b3f4-8135e0be83ea')(it)('should create hooks and properly preload them', done => { const promises = []; for (let i = 0; i < 5; i++) { promises.push( @@ -410,7 +410,7 @@ describe('Hooks', () => { ); }); - it_id('fe7d41eb-e570-4804-ac1f-8b6c407fdafe')('should run the function on the test server', done => { + it_id('fe7d41eb-e570-4804-ac1f-8b6c407fdafe')(it)('should run the function on the test server', done => { app.post('/SomeFunction', function (req, res) { res.json({ success: 'OK!' }); }); @@ -439,7 +439,7 @@ describe('Hooks', () => { ); }); - it_id('63985b4c-a212-4a86-aa0e-eb4600bb485b')('should run the function on the test server (error handling)', done => { + it_id('63985b4c-a212-4a86-aa0e-eb4600bb485b')(it)('should run the function on the test server (error handling)', done => { app.post('/SomeFunctionError', function (req, res) { res.json({ error: { code: 1337, error: 'hacking that one!' } }); }); @@ -473,7 +473,7 @@ describe('Hooks', () => { ); }); - it_id('bacc1754-2a3a-4a7a-8d0e-f80af36da1ef')('should provide X-Parse-Webhook-Key when defined', done => { + it_id('bacc1754-2a3a-4a7a-8d0e-f80af36da1ef')(it)('should provide X-Parse-Webhook-Key when defined', done => { app.post('/ExpectingKey', function (req, res) { if (req.get('X-Parse-Webhook-Key') === 'hook') { res.json({ success: 'correct key provided' }); @@ -506,7 +506,7 @@ describe('Hooks', () => { ); }); - it_id('eeb67946-42c6-4581-89af-2abb4927913e')('should not pass X-Parse-Webhook-Key if not provided', done => { + it_id('eeb67946-42c6-4581-89af-2abb4927913e')(it)('should not pass X-Parse-Webhook-Key if not provided', done => { reconfigureServer({ webhookKey: undefined }).then(() => { app.post('/ExpectingKeyAlso', function (req, res) { if (req.get('X-Parse-Webhook-Key') === 'hook') { @@ -545,7 +545,7 @@ describe('Hooks', () => { }); }); - it_id('21decb65-4b93-4791-85a3-ab124a9ea3ac')('should run the beforeSave hook on the test server', done => { + it_id('21decb65-4b93-4791-85a3-ab124a9ea3ac')(it)('should run the beforeSave hook on the test server', done => { let triggerCount = 0; app.post('/BeforeSaveSome', function (req, res) { triggerCount++; @@ -576,7 +576,7 @@ describe('Hooks', () => { }); }); - it_id('52e3152b-5514-4418-9e76-1f394368b8fb')('beforeSave hooks should correctly handle responses containing entire object', done => { + it_id('52e3152b-5514-4418-9e76-1f394368b8fb')(it)('beforeSave hooks should correctly handle responses containing entire object', done => { app.post('/BeforeSaveSome2', function (req, res) { const object = Parse.Object.fromJSON(req.body.object); object.set('hello', 'world'); @@ -600,7 +600,7 @@ describe('Hooks', () => { }); }); - it_id('d27a7587-abb5-40d5-9805-051ee91de474')('should run the afterSave hook on the test server', done => { + it_id('d27a7587-abb5-40d5-9805-051ee91de474')(it)('should run the afterSave hook on the test server', done => { let triggerCount = 0; let newObjectId; app.post('/AfterSaveSome', function (req, res) { diff --git a/spec/ParseInstallation.spec.js b/spec/ParseInstallation.spec.js index a5956124d3..c03a727b4a 100644 --- a/spec/ParseInstallation.spec.js +++ b/spec/ParseInstallation.spec.js @@ -406,7 +406,7 @@ describe('Installations', () => { }); }); - it_id('95955e90-04bc-4437-920e-b84bc30dba01')('updating with new channels', done => { + it_id('95955e90-04bc-4437-920e-b84bc30dba01')(it)('updating with new channels', done => { const input = { installationId: '12345678-abcd-abcd-abcd-123456789abc', deviceType: 'android', @@ -856,7 +856,7 @@ describe('Installations', () => { }); }); - it_id('22311bc7-3f4f-42c1-a958-57083929e80d')('update is linking two existing objects w/ increment', done => { + it_id('22311bc7-3f4f-42c1-a958-57083929e80d')(it)('update is linking two existing objects w/ increment', done => { const installId = '12345678-abcd-abcd-abcd-123456789abc'; const t = '0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef'; let input = { @@ -969,7 +969,7 @@ describe('Installations', () => { }); }); - it_id('f2975078-eab7-4287-a932-288842e3cfb9')('update is linking two existing with installation id w/ op', done => { + it_id('f2975078-eab7-4287-a932-288842e3cfb9')(it)('update is linking two existing with installation id w/ op', done => { const installId = '12345678-abcd-abcd-abcd-123456789abc'; const t = '0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef'; let input = { @@ -1239,7 +1239,7 @@ describe('Installations', () => { }); }); - it_id('e581faea-c1b4-4c64-af8c-52287ce6cd06')('can use push with beforeSave', async () => { + it_id('e581faea-c1b4-4c64-af8c-52287ce6cd06')(it)('can use push with beforeSave', async () => { const input = { deviceToken: '11433856eed2f1285fb3aa11136718c1198ed5647875096952c66bf8cb976306', deviceType: 'ios', diff --git a/spec/ParseLiveQuery.spec.js b/spec/ParseLiveQuery.spec.js index ed9d0ed980..a65eef6084 100644 --- a/spec/ParseLiveQuery.spec.js +++ b/spec/ParseLiveQuery.spec.js @@ -878,7 +878,7 @@ describe('ParseLiveQuery', function () { await expectAsync(query.subscribe()).toBeRejectedWith(new Error('Invalid session token')); }); - it_id('4ccc9508-ae6a-46ec-932a-9f5e49ab3b9e')('handle invalid websocket payload length', async done => { + it_id('4ccc9508-ae6a-46ec-932a-9f5e49ab3b9e')(it)('handle invalid websocket payload length', async done => { await reconfigureServer({ liveQuery: { classNames: ['TestObject'], @@ -915,7 +915,7 @@ describe('ParseLiveQuery', function () { }, 1000); }); - it_id('39a9191f-26dd-4e05-a379-297a67928de8')('should execute live query update on email validation', async done => { + it_id('39a9191f-26dd-4e05-a379-297a67928de8')(it)('should execute live query update on email validation', async done => { const emailAdapter = { sendVerificationEmail: () => {}, sendPasswordResetEmail: () => Promise.resolve(), @@ -1145,7 +1145,7 @@ describe('ParseLiveQuery', function () { await object.save(); }); - it_id('2f95d8a9-7675-45ba-a4a6-e45cb7efb1fb')('does shutdown liveQuery server', async () => { + it_id('2f95d8a9-7675-45ba-a4a6-e45cb7efb1fb')(it)('does shutdown liveQuery server', async () => { await reconfigureServer({ appId: 'test_app_id' }); const config = { appId: 'hello_test', diff --git a/spec/ParsePolygon.spec.js b/spec/ParsePolygon.spec.js index 4163ea00db..b53846d4ba 100644 --- a/spec/ParsePolygon.spec.js +++ b/spec/ParsePolygon.spec.js @@ -62,7 +62,7 @@ describe('Parse.Polygon testing', () => { }, done.fail); }); - it_id('3019353b-d5b3-4e53-bcb1-716418328bdd')('polygon equalTo (open/closed) path', done => { + it_id('3019353b-d5b3-4e53-bcb1-716418328bdd')(it)('polygon equalTo (open/closed) path', done => { const openPoints = [ [0, 0], [0, 1], diff --git a/spec/ParseQuery.Aggregate.spec.js b/spec/ParseQuery.Aggregate.spec.js index 3d539fbc5a..126135392a 100644 --- a/spec/ParseQuery.Aggregate.spec.js +++ b/spec/ParseQuery.Aggregate.spec.js @@ -95,7 +95,7 @@ describe('Parse.Query Aggregate testing', () => { }); }); - it_id('add7050f-65d5-4a13-b526-5bd1ee09c7f1')('group by field', done => { + it_id('add7050f-65d5-4a13-b526-5bd1ee09c7f1')(it)('group by field', done => { const options = Object.assign({}, masterKeyOptions, { body: { $group: { _id: '$name' }, @@ -115,7 +115,7 @@ describe('Parse.Query Aggregate testing', () => { .catch(done.fail); }); - it_id('0ab0d776-e45d-419a-9b35-3d11933b77d1')('group by pipeline operator', async () => { + it_id('0ab0d776-e45d-419a-9b35-3d11933b77d1')(it)('group by pipeline operator', async () => { const options = Object.assign({}, masterKeyOptions, { body: { pipeline: { @@ -133,7 +133,7 @@ describe('Parse.Query Aggregate testing', () => { expect(resp.results[2].objectId).not.toBe(undefined); }); - it_id('b6b42145-7eb4-47aa-ada6-8c1444420e07')('group by empty object', done => { + it_id('b6b42145-7eb4-47aa-ada6-8c1444420e07')(it)('group by empty object', done => { const obj = new TestObject(); const pipeline = [ { @@ -152,7 +152,7 @@ describe('Parse.Query Aggregate testing', () => { }); }); - it_id('0f5f6869-e675-41b9-9ad2-52b201124fb0')('group by empty string', done => { + it_id('0f5f6869-e675-41b9-9ad2-52b201124fb0')(it)('group by empty string', done => { const obj = new TestObject(); const pipeline = [ { @@ -171,7 +171,7 @@ describe('Parse.Query Aggregate testing', () => { }); }); - it_id('b9c4f1b4-47f4-4ff4-88fb-586711f57e4a')('group by empty array', done => { + it_id('b9c4f1b4-47f4-4ff4-88fb-586711f57e4a')(it)('group by empty array', done => { const obj = new TestObject(); const pipeline = [ { @@ -190,7 +190,7 @@ describe('Parse.Query Aggregate testing', () => { }); }); - it_id('bf5ee3e5-986c-4994-9c8d-79310283f602')('group by multiple columns ', done => { + it_id('bf5ee3e5-986c-4994-9c8d-79310283f602')(it)('group by multiple columns ', done => { const obj1 = new TestObject(); const obj2 = new TestObject(); const obj3 = new TestObject(); @@ -216,7 +216,7 @@ describe('Parse.Query Aggregate testing', () => { }); }); - it_id('3e652c61-78e1-4541-83ac-51ad1def9874')('group by date object', done => { + it_id('3e652c61-78e1-4541-83ac-51ad1def9874')(it)('group by date object', done => { const obj1 = new TestObject(); const obj2 = new TestObject(); const obj3 = new TestObject(); @@ -246,7 +246,7 @@ describe('Parse.Query Aggregate testing', () => { }); }); - it_id('5d3a0f73-1f49-46f3-9be5-caf1eaefec79')('group by date object transform', done => { + it_id('5d3a0f73-1f49-46f3-9be5-caf1eaefec79')(it)('group by date object transform', done => { const obj1 = new TestObject(); const obj2 = new TestObject(); const obj3 = new TestObject(); @@ -276,7 +276,7 @@ describe('Parse.Query Aggregate testing', () => { }); }); - it_id('1f9b10f7-dc0e-467f-b506-a303b9c36258')('group by number', done => { + it_id('1f9b10f7-dc0e-467f-b506-a303b9c36258')(it)('group by number', done => { const options = Object.assign({}, masterKeyOptions, { body: { $group: { _id: '$score' }, @@ -296,7 +296,7 @@ describe('Parse.Query Aggregate testing', () => { .catch(done.fail); }); - it_id('c7695018-03de-49e4-8a72-d4d956f70deb')(it_exclude_dbs(['postgres'])('group and multiply transform', done => { + it_id('c7695018-03de-49e4-8a72-d4d956f70deb')(it_exclude_dbs(['postgres']))('group and multiply transform', done => { const obj1 = new TestObject({ name: 'item a', quantity: 2, price: 10 }); const obj2 = new TestObject({ name: 'item b', quantity: 5, price: 5 }); const pipeline = [ @@ -317,9 +317,9 @@ describe('Parse.Query Aggregate testing', () => { expect(results[0].total).toEqual(45); done(); }); - })); + }); - it_id('2d278175-7594-4b29-bef4-04c778b7a42f')(it_exclude_dbs(['postgres'])('project and multiply transform', done => { + it_id('2d278175-7594-4b29-bef4-04c778b7a42f')(it_exclude_dbs(['postgres']))('project and multiply transform', done => { const obj1 = new TestObject({ name: 'item a', quantity: 2, price: 10 }); const obj2 = new TestObject({ name: 'item b', quantity: 5, price: 5 }); const pipeline = [ @@ -349,9 +349,9 @@ describe('Parse.Query Aggregate testing', () => { } done(); }); - })); + }); - it_id('9c9d9318-3a9e-4c2a-8a09-d3aa52c7505b')(it_exclude_dbs(['postgres'])('project without objectId transform', done => { + it_id('9c9d9318-3a9e-4c2a-8a09-d3aa52c7505b')(it_exclude_dbs(['postgres']))('project without objectId transform', done => { const obj1 = new TestObject({ name: 'item a', quantity: 2, price: 10 }); const obj2 = new TestObject({ name: 'item b', quantity: 5, price: 5 }); const pipeline = [ @@ -381,9 +381,9 @@ describe('Parse.Query Aggregate testing', () => { expect(results[1].objectId).toEqual(undefined); done(); }); - })); + }); - it_id('f92c82ac-1993-4758-b718-45689dfc4154')(it_exclude_dbs(['postgres'])('project updatedAt only transform', done => { + it_id('f92c82ac-1993-4758-b718-45689dfc4154')(it_exclude_dbs(['postgres']))('project updatedAt only transform', done => { const pipeline = [ { $project: { _id: 0, updatedAt: 1 }, @@ -399,9 +399,9 @@ describe('Parse.Query Aggregate testing', () => { } done(); }); - })); + }); - it_id('99566b1d-778d-4444-9deb-c398108e659d')(it_exclude_dbs(['postgres'])('can group by any date field (it does not work if you have dirty data)', + it_id('99566b1d-778d-4444-9deb-c398108e659d')(it_exclude_dbs(['postgres']))('can group by any date field (it does not work if you have dirty data)', done => { // rows in your collection with non date data in the field that is supposed to be a date const obj1 = new TestObject({ dateField2019: new Date(1990, 11, 1) }); @@ -437,7 +437,7 @@ describe('Parse.Query Aggregate testing', () => { }) .catch(done.fail); } - )); + ); 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 @@ -472,7 +472,7 @@ describe('Parse.Query Aggregate testing', () => { } ); - it_id('bf3c2704-b721-4b1b-92fa-e1b129ae4aff')('group by pointer', done => { + it_id('bf3c2704-b721-4b1b-92fa-e1b129ae4aff')(it)('group by pointer', done => { const pointer1 = new TestObject(); const pointer2 = new TestObject(); const obj1 = new TestObject({ pointer: pointer1 }); @@ -493,7 +493,7 @@ describe('Parse.Query Aggregate testing', () => { }); }); - it_id('9ee9e8c0-a590-4af9-97a9-4b8e5080ffae')('group sum query', done => { + it_id('9ee9e8c0-a590-4af9-97a9-4b8e5080ffae')(it)('group sum query', done => { const options = Object.assign({}, masterKeyOptions, { body: { $group: { _id: null, total: { $sum: '$score' } }, @@ -509,7 +509,7 @@ describe('Parse.Query Aggregate testing', () => { .catch(done.fail); }); - it_id('39133cd6-5bdf-4917-b672-a9d7a9157b6f')('group count query', done => { + it_id('39133cd6-5bdf-4917-b672-a9d7a9157b6f')(it)('group count query', done => { const options = Object.assign({}, masterKeyOptions, { body: { $group: { _id: null, total: { $sum: 1 } }, @@ -525,7 +525,7 @@ describe('Parse.Query Aggregate testing', () => { .catch(done.fail); }); - it_id('48685ff3-066f-4353-82e7-87f39d812ff7')('group min query', done => { + it_id('48685ff3-066f-4353-82e7-87f39d812ff7')(it)('group min query', done => { const options = Object.assign({}, masterKeyOptions, { body: { $group: { _id: null, minScore: { $min: '$score' } }, @@ -541,7 +541,7 @@ describe('Parse.Query Aggregate testing', () => { .catch(done.fail); }); - it_id('581efea6-6525-4e10-96d9-76d32c73e7a9')('group max query', done => { + it_id('581efea6-6525-4e10-96d9-76d32c73e7a9')(it)('group max query', done => { const options = Object.assign({}, masterKeyOptions, { body: { $group: { _id: null, maxScore: { $max: '$score' } }, @@ -557,7 +557,7 @@ describe('Parse.Query Aggregate testing', () => { .catch(done.fail); }); - it_id('5f880de2-b97f-43d1-89b7-ad903a4be4e2')('group avg query', done => { + it_id('5f880de2-b97f-43d1-89b7-ad903a4be4e2')(it)('group avg query', done => { const options = Object.assign({}, masterKeyOptions, { body: { $group: { _id: null, avgScore: { $avg: '$score' } }, @@ -573,7 +573,7 @@ describe('Parse.Query Aggregate testing', () => { .catch(done.fail); }); - it_id('58e7a1a0-fae1-4993-b336-7bcbd5b7c786')('limit query', done => { + it_id('58e7a1a0-fae1-4993-b336-7bcbd5b7c786')(it)('limit query', done => { const options = Object.assign({}, masterKeyOptions, { body: { $limit: 2, @@ -587,7 +587,7 @@ describe('Parse.Query Aggregate testing', () => { .catch(done.fail); }); - it_id('c892a3d2-8ae8-4b88-bf2b-3c958e1cacd8')('sort ascending query', done => { + it_id('c892a3d2-8ae8-4b88-bf2b-3c958e1cacd8')(it)('sort ascending query', done => { const options = Object.assign({}, masterKeyOptions, { body: { $sort: { name: 1 }, @@ -605,7 +605,7 @@ describe('Parse.Query Aggregate testing', () => { .catch(done.fail); }); - it_id('79d4bc2e-8b69-42ec-8526-20d17e968ab3')('sort decending query', done => { + it_id('79d4bc2e-8b69-42ec-8526-20d17e968ab3')(it)('sort decending query', done => { const options = Object.assign({}, masterKeyOptions, { body: { $sort: { name: -1 }, @@ -623,7 +623,7 @@ describe('Parse.Query Aggregate testing', () => { .catch(done.fail); }); - it_id('b3d97d48-bd6b-444d-be64-cc1fd4738266')('skip query', done => { + it_id('b3d97d48-bd6b-444d-be64-cc1fd4738266')(it)('skip query', done => { const options = Object.assign({}, masterKeyOptions, { body: { $skip: 2, @@ -637,7 +637,7 @@ describe('Parse.Query Aggregate testing', () => { .catch(done.fail); }); - it_id('4a7daee3-5ba1-4c8b-b406-1846a73a64c8')('match comparison date query', done => { + it_id('4a7daee3-5ba1-4c8b-b406-1846a73a64c8')(it)('match comparison date query', done => { const today = new Date(); const yesterday = new Date(); const tomorrow = new Date(); @@ -658,7 +658,7 @@ describe('Parse.Query Aggregate testing', () => { }); }); - it_id('d98c8c20-6dac-4d74-8228-85a1ae46a7d0')('should aggregate with Date object (directAccess)', async () => { + it_id('d98c8c20-6dac-4d74-8228-85a1ae46a7d0')(it)('should aggregate with Date object (directAccess)', async () => { const rest = require('../lib/rest'); const auth = require('../lib/Auth'); const TestObject = Parse.Object.extend('TestObject'); @@ -675,7 +675,7 @@ describe('Parse.Query Aggregate testing', () => { expect(resp.results.length).toBe(1); }); - it_id('3d73d23a-fce1-4ac0-972a-50f6a550f348')('match comparison query', done => { + it_id('3d73d23a-fce1-4ac0-972a-50f6a550f348')(it)('match comparison query', done => { const options = Object.assign({}, masterKeyOptions, { body: { $match: { score: { $gt: 15 } }, @@ -690,7 +690,7 @@ describe('Parse.Query Aggregate testing', () => { .catch(done.fail); }); - it_id('11772059-6c93-41ac-8dfe-e55b6c97e16f')('match multiple comparison query', done => { + it_id('11772059-6c93-41ac-8dfe-e55b6c97e16f')(it)('match multiple comparison query', done => { const options = Object.assign({}, masterKeyOptions, { body: { $match: { score: { $gt: 5, $lt: 15 } }, @@ -707,7 +707,7 @@ describe('Parse.Query Aggregate testing', () => { .catch(done.fail); }); - it_id('ca2efb04-8f73-40ca-a5fc-79d0032bc398')('match complex comparison query', done => { + it_id('ca2efb04-8f73-40ca-a5fc-79d0032bc398')(it)('match complex comparison query', done => { const options = Object.assign({}, masterKeyOptions, { body: { $match: { score: { $gt: 5, $lt: 15 }, views: { $gt: 850, $lt: 1000 } }, @@ -723,7 +723,7 @@ describe('Parse.Query Aggregate testing', () => { .catch(done.fail); }); - it_id('5ef9dcbe-fe54-4db2-b8fb-58c87c6ff072')('match comparison and equality query', done => { + it_id('5ef9dcbe-fe54-4db2-b8fb-58c87c6ff072')(it)('match comparison and equality query', done => { const options = Object.assign({}, masterKeyOptions, { body: { $match: { score: { $gt: 5, $lt: 15 }, views: 900 }, @@ -739,7 +739,7 @@ describe('Parse.Query Aggregate testing', () => { .catch(done.fail); }); - it_id('c910a6af-58df-46aa-bbf8-da014a04cdcd')('match $or query', done => { + it_id('c910a6af-58df-46aa-bbf8-da014a04cdcd')(it)('match $or query', done => { const options = Object.assign({}, masterKeyOptions, { body: { $match: { @@ -762,7 +762,7 @@ describe('Parse.Query Aggregate testing', () => { .catch(done.fail); }); - it_id('0f768dc2-0675-4e45-a763-5ca9c895fa5f')('match objectId query', done => { + it_id('0f768dc2-0675-4e45-a763-5ca9c895fa5f')(it)('match objectId query', done => { const obj1 = new TestObject(); const obj2 = new TestObject(); Parse.Object.saveAll([obj1, obj2]) @@ -778,7 +778,7 @@ describe('Parse.Query Aggregate testing', () => { }); }); - it_id('27349e04-0d9d-453f-ad85-1a811631582d')('match field query', done => { + it_id('27349e04-0d9d-453f-ad85-1a811631582d')(it)('match field query', done => { const obj1 = new TestObject({ name: 'TestObject1' }); const obj2 = new TestObject({ name: 'TestObject2' }); Parse.Object.saveAll([obj1, obj2]) @@ -794,7 +794,7 @@ describe('Parse.Query Aggregate testing', () => { }); }); - it_id('9222e025-d450-4699-8d5b-c5cf9a64fb24')('match pointer query', done => { + it_id('9222e025-d450-4699-8d5b-c5cf9a64fb24')(it)('match pointer query', done => { const pointer1 = new PointerObject(); const pointer2 = new PointerObject(); const obj1 = new TestObject({ pointer: pointer1 }); @@ -817,16 +817,16 @@ describe('Parse.Query Aggregate testing', () => { }); }); - it_id('3a1e2cdc-52c7-4060-bc90-b06d557d85ce')(it_exclude_dbs(['postgres'])('match exists query', done => { + it_id('3a1e2cdc-52c7-4060-bc90-b06d557d85ce')(it_exclude_dbs(['postgres']))('match exists query', done => { const pipeline = [{ $match: { score: { $exists: true } } }]; const query = new Parse.Query(TestObject); query.aggregate(pipeline).then(results => { expect(results.length).toEqual(4); done(); }); - })); + }); - it_id('0adea3f4-73f7-4b48-a7dd-c764ceb947ec')('match date query - createdAt', done => { + it_id('0adea3f4-73f7-4b48-a7dd-c764ceb947ec')(it)('match date query - createdAt', done => { const obj1 = new TestObject(); const obj2 = new TestObject(); @@ -845,7 +845,7 @@ describe('Parse.Query Aggregate testing', () => { }); }); - it_id('cdc0eecb-f547-4881-84cc-c06fb46a636a')('match date query - updatedAt', done => { + it_id('cdc0eecb-f547-4881-84cc-c06fb46a636a')(it)('match date query - updatedAt', done => { const obj1 = new TestObject(); const obj2 = new TestObject(); @@ -864,7 +864,7 @@ describe('Parse.Query Aggregate testing', () => { }); }); - it_id('621fe00a-1127-4341-a8e1-fc579b7ed8bd')('match date query - empty', done => { + it_id('621fe00a-1127-4341-a8e1-fc579b7ed8bd')(it)('match date query - empty', done => { const obj1 = new TestObject(); const obj2 = new TestObject(); @@ -882,7 +882,7 @@ describe('Parse.Query Aggregate testing', () => { }); }); - it_id('802ffc99-861b-4b72-90a6-0c666a2e3fd8')(it_exclude_dbs(['postgres'])('match pointer with operator query', done => { + it_id('802ffc99-861b-4b72-90a6-0c666a2e3fd8')(it_exclude_dbs(['postgres']))('match pointer with operator query', done => { const pointer = new PointerObject(); const obj1 = new TestObject({ pointer }); @@ -903,9 +903,9 @@ describe('Parse.Query Aggregate testing', () => { expect(results.some(result => result.objectId === obj2.id)).toEqual(true); done(); }); - })); + }); - it_id('28090280-7c3e-47f8-8bf6-bebf8566a36c')(it_exclude_dbs(['postgres'])('match null values', async () => { + it_id('28090280-7c3e-47f8-8bf6-bebf8566a36c')(it_exclude_dbs(['postgres']))('match null values', async () => { const obj1 = new Parse.Object('MyCollection'); obj1.set('language', 'en'); obj1.set('otherField', 1); @@ -953,9 +953,9 @@ describe('Parse.Query Aggregate testing', () => { .map(value => value.otherField) .sort() ).toEqual([1, 2, 3, 4]); - })); + }); - it_id('df63d1f5-7c37-4ed9-8bc5-20d82f29f509')('project query', done => { + it_id('df63d1f5-7c37-4ed9-8bc5-20d82f29f509')(it)('project query', done => { const options = Object.assign({}, masterKeyOptions, { body: { $project: { name: 1 }, @@ -975,7 +975,7 @@ describe('Parse.Query Aggregate testing', () => { .catch(done.fail); }); - it_id('69224bbb-8ea0-4ab4-af23-398b6432f668')('multiple project query', done => { + it_id('69224bbb-8ea0-4ab4-af23-398b6432f668')(it)('multiple project query', done => { const options = Object.assign({}, masterKeyOptions, { body: { $project: { name: 1, score: 1, sender: 1 }, @@ -995,7 +995,7 @@ describe('Parse.Query Aggregate testing', () => { .catch(done.fail); }); - it_id('97ce4c7c-8d9f-4ffd-9352-394bc9867bab')('project pointer query', done => { + it_id('97ce4c7c-8d9f-4ffd-9352-394bc9867bab')(it)('project pointer query', done => { const pointer = new PointerObject(); const obj = new TestObject({ pointer, name: 'hello' }); @@ -1018,7 +1018,7 @@ describe('Parse.Query Aggregate testing', () => { }); }); - it_id('3940aac3-ac49-4279-8083-af9096de636f')('project with group query', done => { + it_id('3940aac3-ac49-4279-8083-af9096de636f')(it)('project with group query', done => { const options = Object.assign({}, masterKeyOptions, { body: { $project: { score: 1 }, @@ -1074,7 +1074,7 @@ describe('Parse.Query Aggregate testing', () => { .catch(done.fail); }); - it_id('985e7a66-d4f5-4f72-bd54-ee44670e0ab0')('distinct query', done => { + it_id('985e7a66-d4f5-4f72-bd54-ee44670e0ab0')(it)('distinct query', done => { const options = Object.assign({}, masterKeyOptions, { body: { distinct: 'score' }, }); @@ -1088,7 +1088,7 @@ describe('Parse.Query Aggregate testing', () => { .catch(done.fail); }); - it_id('ef157f86-c456-4a4c-8dac-81910bd0f716')('distinct query with where', done => { + it_id('ef157f86-c456-4a4c-8dac-81910bd0f716')(it)('distinct query with where', done => { const options = Object.assign({}, masterKeyOptions, { body: { distinct: 'score', @@ -1105,7 +1105,7 @@ describe('Parse.Query Aggregate testing', () => { .catch(done.fail); }); - it_id('7f5275cc-2c34-42bc-8a09-43378419c326')('distinct query with where string', done => { + it_id('7f5275cc-2c34-42bc-8a09-43378419c326')(it)('distinct query with where string', done => { const options = Object.assign({}, masterKeyOptions, { body: { distinct: 'score', @@ -1120,7 +1120,7 @@ describe('Parse.Query Aggregate testing', () => { .catch(done.fail); }); - it_id('383b7248-e457-4373-8d5c-f9359384347e')('distinct nested', done => { + it_id('383b7248-e457-4373-8d5c-f9359384347e')(it)('distinct nested', done => { const options = Object.assign({}, masterKeyOptions, { body: { distinct: 'sender.group' }, }); @@ -1134,7 +1134,7 @@ describe('Parse.Query Aggregate testing', () => { .catch(done.fail); }); - it_id('20f14464-adb7-428c-ac7a-5a91a1952a64')('distinct pointer', done => { + it_id('20f14464-adb7-428c-ac7a-5a91a1952a64')(it)('distinct pointer', done => { const pointer1 = new PointerObject(); const pointer2 = new PointerObject(); const obj1 = new TestObject({ pointer: pointer1 }); @@ -1153,7 +1153,7 @@ describe('Parse.Query Aggregate testing', () => { }); }); - it_id('91e6cb94-2837-44b7-b057-0c4965057caa')('distinct class does not exist return empty', done => { + it_id('91e6cb94-2837-44b7-b057-0c4965057caa')(it)('distinct class does not exist return empty', done => { const options = Object.assign({}, masterKeyOptions, { body: { distinct: 'unknown' }, }); @@ -1165,7 +1165,7 @@ describe('Parse.Query Aggregate testing', () => { .catch(done.fail); }); - it_id('bd15daaf-8dc7-458c-81e2-170026f4a8a7')('distinct field does not exist return empty', done => { + it_id('bd15daaf-8dc7-458c-81e2-170026f4a8a7')(it)('distinct field does not exist return empty', done => { const options = Object.assign({}, masterKeyOptions, { body: { distinct: 'unknown' }, }); @@ -1182,7 +1182,7 @@ describe('Parse.Query Aggregate testing', () => { .catch(done.fail); }); - it_id('21988fce-8326-425f-82f0-cd444ca3671b')('distinct array', done => { + it_id('21988fce-8326-425f-82f0-cd444ca3671b')(it)('distinct array', done => { const options = Object.assign({}, masterKeyOptions, { body: { distinct: 'size' }, }); @@ -1197,13 +1197,13 @@ describe('Parse.Query Aggregate testing', () => { .catch(done.fail); }); - it_id('633fde06-c4af-474b-9841-3ccabc24dd4f')('distinct objectId', async () => { + it_id('633fde06-c4af-474b-9841-3ccabc24dd4f')(it)('distinct objectId', async () => { const query = new Parse.Query(TestObject); const results = await query.distinct('objectId'); expect(results.length).toBe(4); }); - it_id('8f9706f4-2703-42f1-b524-f2f7e72bbfe7')('distinct createdAt', async () => { + it_id('8f9706f4-2703-42f1-b524-f2f7e72bbfe7')(it)('distinct createdAt', async () => { const object1 = new TestObject({ createdAt_test: true }); await object1.save(); const object2 = new TestObject({ createdAt_test: true }); @@ -1214,7 +1214,7 @@ describe('Parse.Query Aggregate testing', () => { expect(results.length).toBe(2); }); - it_id('3562e600-8ce5-4d6d-96df-8ff969e81421')('distinct updatedAt', async () => { + it_id('3562e600-8ce5-4d6d-96df-8ff969e81421')(it)('distinct updatedAt', async () => { const object1 = new TestObject({ updatedAt_test: true }); await object1.save(); const object2 = new TestObject(); @@ -1227,7 +1227,7 @@ describe('Parse.Query Aggregate testing', () => { expect(results.length).toBe(2); }); - it_id('5012cfb1-b0aa-429d-a94f-d32d8aa0b7f9')('distinct null field', done => { + it_id('5012cfb1-b0aa-429d-a94f-d32d8aa0b7f9')(it)('distinct null field', done => { const options = Object.assign({}, masterKeyOptions, { body: { distinct: 'distinctField' }, }); @@ -1256,7 +1256,7 @@ describe('Parse.Query Aggregate testing', () => { .catch(done.fail); }); - it_id('d9c19419-e99d-4d9f-b7f3-418e49ee47dd')('does not return sensitive hidden properties', done => { + it_id('d9c19419-e99d-4d9f-b7f3-418e49ee47dd')(it)('does not return sensitive hidden properties', done => { const options = Object.assign({}, masterKeyOptions, { body: { $match: { @@ -1305,7 +1305,7 @@ describe('Parse.Query Aggregate testing', () => { }); }); - it_id('0a23e791-e9b5-457a-9bf9-9c5ecf406f42')(it_exclude_dbs(['postgres'])('aggregate allow multiple of same stage', async done => { + it_id('0a23e791-e9b5-457a-9bf9-9c5ecf406f42')(it_exclude_dbs(['postgres']))('aggregate allow multiple of same stage', async done => { await reconfigureServer({ silent: false }); const pointer1 = new TestObject({ value: 1 }); const pointer2 = new TestObject({ value: 2 }); @@ -1357,7 +1357,7 @@ describe('Parse.Query Aggregate testing', () => { expect(resp.results[0].tempPointer.value).toEqual(2); done(); }); - })); + }); it_only_db('mongo')('aggregate geoNear with location query', async () => { // Create geo index which is required for `geoNear` query diff --git a/spec/ParseQuery.FullTextSearch.spec.js b/spec/ParseQuery.FullTextSearch.spec.js index 43dcff1c6e..11760ec161 100644 --- a/spec/ParseQuery.FullTextSearch.spec.js +++ b/spec/ParseQuery.FullTextSearch.spec.js @@ -30,7 +30,7 @@ const fullTextHelper = async () => { }; describe('Parse.Query Full Text Search testing', () => { - it_id('77ba6779-6584-4e09-8e7e-31f89e741d6a')('fullTextSearch: $search', async () => { + it_id('77ba6779-6584-4e09-8e7e-31f89e741d6a')(it)('fullTextSearch: $search', async () => { await fullTextHelper(); const query = new Parse.Query('TestObject'); query.fullText('subject', 'coffee'); @@ -38,7 +38,7 @@ describe('Parse.Query Full Text Search testing', () => { expect(results.length).toBe(3); }); - it_id('d1992ea6-6d92-4bfa-a487-2a49fbcf8f0d')('fullTextSearch: $search, sort', async () => { + it_id('d1992ea6-6d92-4bfa-a487-2a49fbcf8f0d')(it)('fullTextSearch: $search, sort', async () => { await fullTextHelper(); const query = new Parse.Query('TestObject'); query.fullText('subject', 'coffee'); @@ -51,7 +51,7 @@ describe('Parse.Query Full Text Search testing', () => { expect(results[2].get('score')); }); - it_id('07172595-50de-4be2-984a-d3136bebb22e')('fulltext descending by $score', async () => { + it_id('07172595-50de-4be2-984a-d3136bebb22e')(it)('fulltext descending by $score', async () => { await fullTextHelper(); const query = new Parse.Query('TestObject'); query.fullText('subject', 'coffee'); @@ -68,7 +68,7 @@ describe('Parse.Query Full Text Search testing', () => { expect(second.get('score') >= third.get('score')).toBeTrue(); }); - it_id('8e821973-3fae-4e7c-8152-766228a18cdd')('fullTextSearch: $language', async () => { + it_id('8e821973-3fae-4e7c-8152-766228a18cdd')(it)('fullTextSearch: $language', async () => { await fullTextHelper(); const query = new Parse.Query('TestObject'); query.fullText('subject', 'leche', { language: 'spanish' }); @@ -76,7 +76,7 @@ describe('Parse.Query Full Text Search testing', () => { expect(resp.length).toBe(2); }); - it_id('7d3da216-9582-40ee-a2fe-8316feaf5c0c')('fullTextSearch: $diacriticSensitive', async () => { + it_id('7d3da216-9582-40ee-a2fe-8316feaf5c0c')(it)('fullTextSearch: $diacriticSensitive', async () => { await fullTextHelper(); const query = new Parse.Query('TestObject'); query.fullText('subject', 'CAFÉ', { diacriticSensitive: true }); @@ -84,7 +84,7 @@ describe('Parse.Query Full Text Search testing', () => { expect(resp.length).toBe(1); }); - it_id('dade10c8-2b9c-4f43-bb3f-a13bbd82ac22')('fullTextSearch: $search, invalid input', async () => { + it_id('dade10c8-2b9c-4f43-bb3f-a13bbd82ac22')(it)('fullTextSearch: $search, invalid input', async () => { await fullTextHelper(); const invalidQuery = async () => { const where = { @@ -114,7 +114,7 @@ describe('Parse.Query Full Text Search testing', () => { ); }); - it_id('ff7c6b1c-4712-4847-bb76-f4e1f641f7b5')('fullTextSearch: $language, invalid input', async () => { + it_id('ff7c6b1c-4712-4847-bb76-f4e1f641f7b5')(it)('fullTextSearch: $language, invalid input', async () => { await fullTextHelper(); const query = new Parse.Query('TestObject'); query.fullText('subject', 'leche', { language: true }); @@ -123,7 +123,7 @@ describe('Parse.Query Full Text Search testing', () => { ); }); - it_id('de262dbc-ec75-4ec6-9217-fbb90146c272')('fullTextSearch: $caseSensitive, invalid input', async () => { + it_id('de262dbc-ec75-4ec6-9217-fbb90146c272')(it)('fullTextSearch: $caseSensitive, invalid input', async () => { await fullTextHelper(); const query = new Parse.Query('TestObject'); query.fullText('subject', 'leche', { caseSensitive: 'string' }); @@ -132,7 +132,7 @@ describe('Parse.Query Full Text Search testing', () => { ); }); - it_id('b7b7b3a9-8d6c-4f98-a0ff-0113593d06d4')('fullTextSearch: $diacriticSensitive, invalid input', async () => { + it_id('b7b7b3a9-8d6c-4f98-a0ff-0113593d06d4')(it)('fullTextSearch: $diacriticSensitive, invalid input', async () => { await fullTextHelper(); const query = new Parse.Query('TestObject'); query.fullText('subject', 'leche', { diacriticSensitive: 'string' }); diff --git a/spec/ParseQuery.spec.js b/spec/ParseQuery.spec.js index 0e213a5a8d..6020e2be7d 100644 --- a/spec/ParseQuery.spec.js +++ b/spec/ParseQuery.spec.js @@ -590,7 +590,7 @@ describe('Parse.Query testing', () => { }); }); - it_id('25bb35a6-e953-4d6d-a31c-66324d5ae076')('containsAll object array queries', function (done) { + it_id('25bb35a6-e953-4d6d-a31c-66324d5ae076')(it)('containsAll object array queries', function (done) { const MessageSet = Parse.Object.extend({ className: 'MessageSet' }); const messageList = []; @@ -705,7 +705,7 @@ describe('Parse.Query testing', () => { }); }); - it_id('3ea6ae04-bcc2-453d-8817-4c64d059c2f6')('containsAllStartingWith values must be all of type starting with regex', done => { + it_id('3ea6ae04-bcc2-453d-8817-4c64d059c2f6')(it)('containsAllStartingWith values must be all of type starting with regex', done => { const object = new Parse.Object('Object'); object.set('strings', ['the', 'brown', 'lazy', 'fox', 'jumps']); @@ -884,7 +884,7 @@ describe('Parse.Query testing', () => { ); }); - it_id('01a15195-dde2-4368-b996-d746a4ede3a1')('containedBy pointer array', done => { + it_id('01a15195-dde2-4368-b996-d746a4ede3a1')(it)('containedBy pointer array', done => { const objects = Array.from(Array(10).keys()).map(idx => { const obj = new Parse.Object('Object'); obj.set('key', idx); @@ -1668,7 +1668,7 @@ describe('Parse.Query testing', () => { .catch(done.fail); }); - it_id('65c8238d-cf02-49d0-a919-8a17f5a58280')('can order on an object number field', function (done) { + it_id('65c8238d-cf02-49d0-a919-8a17f5a58280')(it)('can order on an object number field', function (done) { const testSet = [ { sortField: { value: 10 } }, { sortField: { value: 1 } }, @@ -1689,7 +1689,7 @@ describe('Parse.Query testing', () => { .catch(done.fail); }); - it_id('d8f0bead-b931-4d66-8b0c-28c5705e463c')('can order on an object number field (level 2)', function (done) { + it_id('d8f0bead-b931-4d66-8b0c-28c5705e463c')(it)('can order on an object number field (level 2)', function (done) { const testSet = [ { sortField: { value: { field: 10 } } }, { sortField: { value: { field: 1 } } }, @@ -2111,7 +2111,7 @@ describe('Parse.Query testing', () => { .then(done); }); - it_id('823852f6-1de5-45ba-a2b9-ed952fcc6012')('Use a regex that requires all modifiers', function (done) { + it_id('823852f6-1de5-45ba-a2b9-ed952fcc6012')(it)('Use a regex that requires all modifiers', function (done) { const thing = new TestObject(); thing.set('myString', 'PArSe\nCom'); Parse.Object.saveAll([thing]).then(function () { @@ -3786,7 +3786,7 @@ describe('Parse.Query testing', () => { }); }); - it_id('56b09b92-c756-4bae-8c32-1c32b5b4c397')('notEqual with array of pointers', done => { + it_id('56b09b92-c756-4bae-8c32-1c32b5b4c397')(it)('notEqual with array of pointers', done => { const children = []; const parents = []; const promises = []; @@ -4003,7 +4003,7 @@ describe('Parse.Query testing', () => { ); }); - it_id('7079f0ef-47b3-4a1e-aac0-32654dadaa27')('should properly interpret a query v2', done => { + it_id('7079f0ef-47b3-4a1e-aac0-32654dadaa27')(it)('should properly interpret a query v2', done => { const user = new Parse.User(); user.set('username', 'foo'); user.set('password', 'bar'); @@ -4082,7 +4082,7 @@ describe('Parse.Query testing', () => { }); }); - it_id('d95818c0-9e3c-41e6-be20-e7bafb59eefb')('should find objects with array of pointers', done => { + it_id('d95818c0-9e3c-41e6-be20-e7bafb59eefb')(it)('should find objects with array of pointers', done => { const objects = []; while (objects.length != 5) { const object = new Parse.Object('ContainedObject'); @@ -5013,7 +5013,7 @@ describe('Parse.Query testing', () => { equal(results[0].get('name'), group2.get('name')); }); - it_id('8886b994-fbb8-487d-a863-43bbd2b24b73')('withJSON supports geoWithin.centerSphere', done => { + it_id('8886b994-fbb8-487d-a863-43bbd2b24b73')(it)('withJSON supports geoWithin.centerSphere', done => { const inbound = new Parse.GeoPoint(1.5, 1.5); const onbound = new Parse.GeoPoint(10, 10); const outbound = new Parse.GeoPoint(20, 20); @@ -5114,7 +5114,7 @@ describe('Parse.Query testing', () => { .catch(() => done()); }); - it_id('02d4e7e6-859a-4ab6-878d-135ccc77040e')('can add new config to existing config', async () => { + it_id('02d4e7e6-859a-4ab6-878d-135ccc77040e')(it)('can add new config to existing config', async () => { await request({ method: 'PUT', url: 'http://localhost:8378/1/config', diff --git a/spec/ParseRole.spec.js b/spec/ParseRole.spec.js index 9c690f4e4a..35a91c6c15 100644 --- a/spec/ParseRole.spec.js +++ b/spec/ParseRole.spec.js @@ -126,7 +126,7 @@ describe('Parse Role testing', () => { ); }); - it_id('b03abe32-e8e4-4666-9b81-9c804aa53400')('should not recursively load the same role multiple times', done => { + it_id('b03abe32-e8e4-4666-9b81-9c804aa53400')(it)('should not recursively load the same role multiple times', done => { const rootRole = 'RootRole'; const roleNames = ['FooRole', 'BarRole', 'BazRole']; const allRoles = [rootRole].concat(roleNames); diff --git a/spec/ParseUser.spec.js b/spec/ParseUser.spec.js index 62dc8c94df..ede853b4dd 100644 --- a/spec/ParseUser.spec.js +++ b/spec/ParseUser.spec.js @@ -2257,7 +2257,7 @@ describe('Parse.User testing', () => { }); describe('case insensitive signup not allowed', () => { - it_id('464eddc2-7a46-413d-888e-b43b040f1511')('signup should fail with duplicate case insensitive username with basic setter', async () => { + it_id('464eddc2-7a46-413d-888e-b43b040f1511')(it)('signup should fail with duplicate case insensitive username with basic setter', async () => { const user = new Parse.User(); user.set('username', 'test1'); user.set('password', 'test'); @@ -2301,7 +2301,7 @@ describe('Parse.User testing', () => { ); }); - it_id('66e51d52-2420-4b62-8a0d-c7e1b384763e')('edit should fail with duplicate case insensitive email', async () => { + it_id('66e51d52-2420-4b62-8a0d-c7e1b384763e')(it)('edit should fail with duplicate case insensitive email', async () => { const user = new Parse.User(); user.setUsername('test1'); user.setPassword('test'); @@ -2952,7 +2952,7 @@ describe('Parse.User testing', () => { }); }); - it_id('1be98368-19ac-4c77-8531-762a114f43fb')('should send email when upgrading from anon', async done => { + it_id('1be98368-19ac-4c77-8531-762a114f43fb')(it)('should send email when upgrading from anon', async done => { await reconfigureServer(); let emailCalled = false; let emailOptions; @@ -3018,7 +3018,7 @@ describe('Parse.User testing', () => { }); }); - it_id('bf668670-39fa-44d3-a9a9-cad52f36d272')('should not send email when email is not a string', async done => { + it_id('bf668670-39fa-44d3-a9a9-cad52f36d272')(it)('should not send email when email is not a string', async done => { let emailCalled = false; let emailOptions; const emailAdapter = { diff --git a/spec/PasswordPolicy.spec.js b/spec/PasswordPolicy.spec.js index f66d001e14..b39790cfba 100644 --- a/spec/PasswordPolicy.spec.js +++ b/spec/PasswordPolicy.spec.js @@ -3,7 +3,7 @@ const request = require('../lib/request'); describe('Password Policy: ', () => { - it_id('b400a867-9f05-496f-af79-933aa588dde5')('should show the invalid link page if the user clicks on the password reset link after the token expires', done => { + it_id('b400a867-9f05-496f-af79-933aa588dde5')(it)('should show the invalid link page if the user clicks on the password reset link after the token expires', done => { const user = new Parse.User(); let sendEmailOptions; const emailAdapter = { @@ -150,7 +150,7 @@ describe('Password Policy: ', () => { done(); }); - it_id('7d98e1f2-ae89-4038-9ea7-5254854ea42e')('should keep reset token with resetTokenReuseIfValid', async done => { + it_id('7d98e1f2-ae89-4038-9ea7-5254854ea42e')(it)('should keep reset token with resetTokenReuseIfValid', async done => { const sendEmailOptions = []; const emailAdapter = { sendVerificationEmail: () => Promise.resolve(), @@ -1164,7 +1164,7 @@ describe('Password Policy: ', () => { }); }); - it_id('d7d0a93e-efe6-48c0-b622-0f7fb570ccc1')('should succeed if logged in before password expires', done => { + it_id('d7d0a93e-efe6-48c0-b622-0f7fb570ccc1')(it)('should succeed if logged in before password expires', done => { const user = new Parse.User(); reconfigureServer({ appName: 'passwordPolicy', @@ -1197,7 +1197,7 @@ describe('Password Policy: ', () => { }); }); - it_id('22428408-8763-445d-9833-2b2d92008f62')('should fail if logged in after password expires', done => { + it_id('22428408-8763-445d-9833-2b2d92008f62')(it)('should fail if logged in after password expires', done => { const user = new Parse.User(); reconfigureServer({ appName: 'passwordPolicy', @@ -1236,7 +1236,7 @@ describe('Password Policy: ', () => { }); }); - it_id('cc97a109-e35f-4f94-b942-3a6134921cdd')('should apply password expiry policy to existing user upon first login after policy is enabled', done => { + it_id('cc97a109-e35f-4f94-b942-3a6134921cdd')(it)('should apply password expiry policy to existing user upon first login after policy is enabled', done => { const user = new Parse.User(); reconfigureServer({ appName: 'passwordPolicy', @@ -1304,7 +1304,7 @@ describe('Password Policy: ', () => { }); }); - it_id('d1e6ab9d-c091-4fea-b952-08b7484bfc89')('should reset password timestamp when password is reset', done => { + it_id('d1e6ab9d-c091-4fea-b952-08b7484bfc89')(it)('should reset password timestamp when password is reset', done => { const user = new Parse.User(); const emailAdapter = { sendVerificationEmail: () => Promise.resolve(), diff --git a/spec/PointerPermissions.spec.js b/spec/PointerPermissions.spec.js index 6e6ba439d8..0e4023adc1 100644 --- a/spec/PointerPermissions.spec.js +++ b/spec/PointerPermissions.spec.js @@ -226,7 +226,7 @@ describe('Pointer Permissions', () => { }); }); - it_id('f38c35e7-d804-4d32-986d-2579e25d2461')('should query on pointer permission enabled column', done => { + it_id('f38c35e7-d804-4d32-986d-2579e25d2461')(it)('should query on pointer permission enabled column', done => { const config = Config.get(Parse.applicationId); const user = new Parse.User(); const user2 = new Parse.User(); @@ -1070,7 +1070,7 @@ describe('Pointer Permissions', () => { } }); - it_id('1bbb9ed6-5558-4ce5-a238-b1a2015d273f')('should work with write', async done => { + it_id('1bbb9ed6-5558-4ce5-a238-b1a2015d273f')(it)('should work with write', async done => { const config = Config.get(Parse.applicationId); const user = new Parse.User(); const user2 = new Parse.User(); @@ -1203,7 +1203,7 @@ describe('Pointer Permissions', () => { done(); }); - it_id('8a7d188c-b75c-4eac-90b6-9b0b11f873ae')('should query on pointer permission enabled column', async done => { + it_id('8a7d188c-b75c-4eac-90b6-9b0b11f873ae')(it)('should query on pointer permission enabled column', async done => { const config = Config.get(Parse.applicationId); const user = new Parse.User(); const user2 = new Parse.User(); @@ -2058,7 +2058,7 @@ describe('Pointer Permissions', () => { done(); }); - it_id('9ba681d5-59f5-4996-b36d-6647d23e6a44')('should fail for user not listed', async done => { + it_id('9ba681d5-59f5-4996-b36d-6647d23e6a44')(it)('should fail for user not listed', async done => { await updateCLP({ get: { pointerFields: ['owner'], @@ -2218,7 +2218,7 @@ describe('Pointer Permissions', () => { done(); }); - it_id('bcdb158d-c0b6-45e3-84ab-a3636f7cb470')('should fail for user not listed', async done => { + it_id('bcdb158d-c0b6-45e3-84ab-a3636f7cb470')(it)('should fail for user not listed', async done => { await updateCLP({ update: { pointerFields: ['owner'], @@ -2270,7 +2270,7 @@ describe('Pointer Permissions', () => { done(); }); - it_id('70aa3853-6e26-4c38-a927-2ddb24ced7d4')('should fail for user not listed', async done => { + it_id('70aa3853-6e26-4c38-a927-2ddb24ced7d4')(it)('should fail for user not listed', async done => { await updateCLP({ delete: { pointerFields: ['owner'], @@ -2685,7 +2685,7 @@ describe('Pointer Permissions', () => { done(); }); - it_id('2b19234a-a471-48b4-bd1a-27bd286d066f')('should be allowed (multiple users in array)', async done => { + it_id('2b19234a-a471-48b4-bd1a-27bd286d066f')(it)('should be allowed (multiple users in array)', async done => { await updateCLP({ update: { pointerFields: ['moderators'], @@ -2874,7 +2874,7 @@ describe('Pointer Permissions', () => { done(); }); - it_id('51e896e9-73b3-404f-b5ff-bdb99005a9f7')('should be restricted when updating object without addField permission', async done => { + it_id('51e896e9-73b3-404f-b5ff-bdb99005a9f7')(it)('should be restricted when updating object without addField permission', async done => { await updateCLP({ update: { '*': true, @@ -2946,7 +2946,7 @@ describe('Pointer Permissions', () => { await initialize(); }); - it_id('b43db366-8cce-4a11-9cf2-eeee9603d40b')('should not limit the scope of grouped read permissions', async done => { + it_id('b43db366-8cce-4a11-9cf2-eeee9603d40b')(it)('should not limit the scope of grouped read permissions', async done => { await updateCLP({ get: { pointerFields: ['owner'], @@ -2967,7 +2967,7 @@ describe('Pointer Permissions', () => { done(); }); - it_id('bbb1686d-0e2a-4365-8b64-b5faa3e7b9cf')('should not limit the scope of grouped write permissions', async done => { + it_id('bbb1686d-0e2a-4365-8b64-b5faa3e7b9cf')(it)('should not limit the scope of grouped write permissions', async done => { await updateCLP({ update: { pointerFields: ['owner'], diff --git a/spec/PushController.spec.js b/spec/PushController.spec.js index 77b35f59d2..875825025d 100644 --- a/spec/PushController.spec.js +++ b/spec/PushController.spec.js @@ -168,7 +168,7 @@ describe('PushController', () => { done(); }); - it_id('01e3e1b8-fad2-4249-b664-5a3efaab8cb1')('properly increment badges', async () => { + it_id('01e3e1b8-fad2-4249-b664-5a3efaab8cb1')(it)('properly increment badges', async () => { const pushAdapter = { send: function (body, installations) { const badge = body.data.badge; @@ -233,7 +233,7 @@ describe('PushController', () => { } }); - it_id('14afcedf-e65d-41cd-981e-07f32df84c14')('properly increment badges by more than 1', async () => { + it_id('14afcedf-e65d-41cd-981e-07f32df84c14')(it)('properly increment badges by more than 1', async () => { const pushAdapter = { send: function (body, installations) { const badge = body.data.badge; @@ -295,7 +295,7 @@ describe('PushController', () => { } }); - it_id('758dd579-aa91-4010-9033-8d48d3463644')('properly set badges to 1', async () => { + it_id('758dd579-aa91-4010-9033-8d48d3463644')(it)('properly set badges to 1', async () => { const pushAdapter = { send: function (body, installations) { const badge = body.data.badge; @@ -350,7 +350,7 @@ describe('PushController', () => { } }); - it_id('75c39ae3-06ac-4354-b321-931e81c5a927')('properly set badges to 1 with complex query #2903 #3022', async () => { + it_id('75c39ae3-06ac-4354-b321-931e81c5a927')(it)('properly set badges to 1 with complex query #2903 #3022', async () => { const payload = { data: { alert: 'Hello World!', @@ -406,7 +406,7 @@ describe('PushController', () => { expect(results.length).toBe(5); }); - it_id('667f31c0-b458-4f61-ab57-668c04e3cc0b')('properly creates _PushStatus', async () => { + it_id('667f31c0-b458-4f61-ab57-668c04e3cc0b')(it)('properly creates _PushStatus', async () => { const pushStatusAfterSave = { handler: function () {}, }; @@ -521,7 +521,7 @@ describe('PushController', () => { expect(succeedCount).toBe(1); }); - it_id('30e0591a-56de-4720-8c60-7d72291b532a')('properly creates _PushStatus without serverURL', async () => { + it_id('30e0591a-56de-4720-8c60-7d72291b532a')(it)('properly creates _PushStatus without serverURL', async () => { const pushStatusAfterSave = { handler: function () {}, }; @@ -615,7 +615,7 @@ describe('PushController', () => { } }); - it_id('53551fc3-b975-4774-92e6-7e5f3c05e105')('should support full RESTQuery for increment', async () => { + it_id('53551fc3-b975-4774-92e6-7e5f3c05e105')(it)('should support full RESTQuery for increment', async () => { const payload = { data: { alert: 'Hello World!', @@ -1030,7 +1030,7 @@ describe('PushController', () => { // No installation is in es so only 1 call for fr, and another for default }); - it_id('ef2e5569-50c3-40c2-ab49-175cdbd5f024')('should update audiences', async () => { + it_id('ef2e5569-50c3-40c2-ab49-175cdbd5f024')(it)('should update audiences', async () => { const pushAdapter = { send: function (body, installations) { return successfulTransmissions(body, installations); diff --git a/spec/PushWorker.spec.js b/spec/PushWorker.spec.js index a8d641311e..6299962d52 100644 --- a/spec/PushWorker.spec.js +++ b/spec/PushWorker.spec.js @@ -271,7 +271,7 @@ describe('PushWorker', () => { toAwait.then(done).catch(done); }); - it_id('764d28ab-241b-4b96-8ce9-e03541850e3f')('tracks push status per UTC offsets', done => { + it_id('764d28ab-241b-4b96-8ce9-e03541850e3f')(it)('tracks push status per UTC offsets', done => { const config = Config.get('test'); const handler = pushStatusHandler(config); const spy = spyOn(rest, 'update').and.callThrough(); diff --git a/spec/RegexVulnerabilities.spec.js b/spec/RegexVulnerabilities.spec.js index b15494af14..9dc8eb8d89 100644 --- a/spec/RegexVulnerabilities.spec.js +++ b/spec/RegexVulnerabilities.spec.js @@ -102,7 +102,7 @@ describe('Regex Vulnerabilities', () => { expect(user.get('emailVerified')).toEqual(false); }); - it_id('92bbb86d-bcda-49fa-8d79-aa0501078044')('should work with plain token', async () => { + it_id('92bbb86d-bcda-49fa-8d79-aa0501078044')(it)('should work with plain token', async () => { expect(user.get('emailVerified')).toEqual(false); const current = await request({ method: 'GET', diff --git a/spec/RestQuery.spec.js b/spec/RestQuery.spec.js index 3826d88f55..6fe3c0fa18 100644 --- a/spec/RestQuery.spec.js +++ b/spec/RestQuery.spec.js @@ -392,7 +392,7 @@ describe('RestQuery.each', () => { beforeEach(() => { config = Config.get('test'); }); - it_id('3416c90b-ee2e-4bb5-9231-46cd181cd0a2')('should run each', async () => { + it_id('3416c90b-ee2e-4bb5-9231-46cd181cd0a2')(it)('should run each', async () => { const objects = []; while (objects.length != 10) { objects.push(new Parse.Object('Object', { value: objects.length })); @@ -419,7 +419,7 @@ describe('RestQuery.each', () => { expect(results.length).toBe(7); }); - it_id('0fe22501-4b18-461e-b87d-82ceac4a496e')('should work with query on relations', async () => { + it_id('0fe22501-4b18-461e-b87d-82ceac4a496e')(it)('should work with query on relations', async () => { const objectA = new Parse.Object('Letter', { value: 'A' }); const objectB = new Parse.Object('Letter', { value: 'B' }); diff --git a/spec/SchemaPerformance.spec.js b/spec/SchemaPerformance.spec.js index 41210e8085..728b88804c 100644 --- a/spec/SchemaPerformance.spec.js +++ b/spec/SchemaPerformance.spec.js @@ -205,7 +205,7 @@ describe('Schema Performance', function () { expect(getAllSpy.calls.count()).toBe(2); }); - it_id('9dd70965-b683-4cb8-b43a-44c1f4def9f4')('does reload with schemaCacheTtl', async () => { + it_id('9dd70965-b683-4cb8-b43a-44c1f4def9f4')(it)('does reload with schemaCacheTtl', async () => { const databaseURI = process.env.PARSE_SERVER_TEST_DB === 'postgres' ? process.env.PARSE_SERVER_TEST_DATABASE_URI @@ -241,7 +241,7 @@ describe('Schema Performance', function () { expect(spy.reloadCalls).toBe(1); }); - it_id('b0ae21f2-c947-48ed-a0db-e8900d45a4c8')('cannot set invalid databaseOptions', async () => { + it_id('b0ae21f2-c947-48ed-a0db-e8900d45a4c8')(it)('cannot set invalid databaseOptions', async () => { const expectError = async (key, value, expected) => expectAsync( reconfigureServer({ databaseAdapter: undefined, databaseOptions: { [key]: value } }) diff --git a/spec/Uniqueness.spec.js b/spec/Uniqueness.spec.js index 0c2bd5fbf6..92ee6ea92c 100644 --- a/spec/Uniqueness.spec.js +++ b/spec/Uniqueness.spec.js @@ -68,7 +68,7 @@ describe('Uniqueness', function () { }); }); - it_id('802650a9-a6db-447e-88d0-8aae99100088')('fails when attempting to ensure uniqueness of fields that are not currently unique', done => { + it_id('802650a9-a6db-447e-88d0-8aae99100088')(it)('fails when attempting to ensure uniqueness of fields that are not currently unique', done => { const o1 = new Parse.Object('UniqueFail'); o1.set('key', 'val'); const o2 = new Parse.Object('UniqueFail'); diff --git a/spec/UserController.spec.js b/spec/UserController.spec.js index ea135925ae..e240d4666a 100644 --- a/spec/UserController.spec.js +++ b/spec/UserController.spec.js @@ -5,7 +5,7 @@ const Auth = require('../lib/Auth'); describe('UserController', () => { describe('sendVerificationEmail', () => { describe('parseFrameURL not provided', () => { - it_id('61338330-eca7-4c33-8816-7ff05966f43b')('uses publicServerURL', async () => { + it_id('61338330-eca7-4c33-8816-7ff05966f43b')(it)('uses publicServerURL', async () => { await reconfigureServer({ publicServerURL: 'http://www.example.com', customPages: { @@ -40,7 +40,7 @@ describe('UserController', () => { }); describe('parseFrameURL provided', () => { - it_id('673c2bb1-049e-4dda-b6be-88c866260036')('uses parseFrameURL and includes the destination in the link parameter', async () => { + it_id('673c2bb1-049e-4dda-b6be-88c866260036')(it)('uses parseFrameURL and includes the destination in the link parameter', async () => { await reconfigureServer({ publicServerURL: 'http://www.example.com', customPages: { diff --git a/spec/ValidationAndPasswordsReset.spec.js b/spec/ValidationAndPasswordsReset.spec.js index 079cb73d42..7c5334261a 100644 --- a/spec/ValidationAndPasswordsReset.spec.js +++ b/spec/ValidationAndPasswordsReset.spec.js @@ -33,7 +33,7 @@ describe('Custom Pages, Email Verification, Password Reset', () => { }); }); - it_id('5e558687-40f3-496c-9e4f-af6100bd1b2f')('sends verification email if email verification is enabled', done => { + it_id('5e558687-40f3-496c-9e4f-af6100bd1b2f')(it)('sends verification email if email verification is enabled', done => { const emailAdapter = { sendVerificationEmail: () => Promise.resolve(), sendPasswordResetEmail: () => Promise.resolve(), @@ -158,7 +158,7 @@ describe('Custom Pages, Email Verification, Password Reset', () => { }, 200); }); - it_id('33d31119-c724-4f5d-83ec-f56815d23df3')('does send with a simple adapter', done => { + it_id('33d31119-c724-4f5d-83ec-f56815d23df3')(it)('does send with a simple adapter', done => { let calls = 0; const emailAdapter = { sendMail: function (options) { @@ -305,7 +305,7 @@ describe('Custom Pages, Email Verification, Password Reset', () => { expect(verifyUserEmailsSpy).toHaveBeenCalledTimes(2); }); - it_id('2a5d24be-2ca5-4385-b580-1423bd392e43')('allows user to login only after user clicks on the link to confirm email address if preventLoginWithUnverifiedEmail is set to true', async () => { + it_id('2a5d24be-2ca5-4385-b580-1423bd392e43')(it)('allows user to login only after user clicks on the link to confirm email address if preventLoginWithUnverifiedEmail is set to true', async () => { let sendEmailOptions; const emailAdapter = { sendVerificationEmail: options => { @@ -381,7 +381,7 @@ describe('Custom Pages, Email Verification, Password Reset', () => { }); }); - it_id('a18a07af-0319-4f15-8237-28070c5948fa')('does not allow signup with preventSignupWithUnverified', async () => { + it_id('a18a07af-0319-4f15-8237-28070c5948fa')(it)('does not allow signup with preventSignupWithUnverified', async () => { let sendEmailOptions; const emailAdapter = { sendVerificationEmail: options => { @@ -616,7 +616,7 @@ describe('Custom Pages, Email Verification, Password Reset', () => { }); }); - it_id('45f550a2-a2b2-4b2b-b533-ccbf96139cc9')('receives the app name and user in the adapter', done => { + it_id('45f550a2-a2b2-4b2b-b533-ccbf96139cc9')(it)('receives the app name and user in the adapter', done => { let emailSent = false; const emailAdapter = { sendVerificationEmail: options => { @@ -644,7 +644,7 @@ describe('Custom Pages, Email Verification, Password Reset', () => { }); }); - it_id('ea37ef62-aad8-4a17-8dfe-35e5b2986f0f')('when you click the link in the email it sets emailVerified to true and redirects you', done => { + it_id('ea37ef62-aad8-4a17-8dfe-35e5b2986f0f')(it)('when you click the link in the email it sets emailVerified to true and redirects you', done => { const user = new Parse.User(); let sendEmailOptions; const emailAdapter = { diff --git a/spec/WinstonLoggerAdapter.spec.js b/spec/WinstonLoggerAdapter.spec.js index 9a847da2f8..81bdc213de 100644 --- a/spec/WinstonLoggerAdapter.spec.js +++ b/spec/WinstonLoggerAdapter.spec.js @@ -174,7 +174,7 @@ describe_only(() => { describe_only(() => { return process.env.PARSE_SERVER_LOG_LEVEL !== 'debug'; })('verbose logs', () => { - it_id('9ca72994-d255-4c11-a5a2-693c99ee2cdb')('mask sensitive information in _User class', done => { + it_id('9ca72994-d255-4c11-a5a2-693c99ee2cdb')(it)('mask sensitive information in _User class', done => { reconfigureServer({ verbose: true }) .then(() => createTestUser()) .then(() => { diff --git a/spec/helper.js b/spec/helper.js index 54937b27a6..c09a0c4eb4 100644 --- a/spec/helper.js +++ b/spec/helper.js @@ -470,27 +470,15 @@ try { /** * Assign ID to test and run it. Disable test if its UUID is found in testExclusionList. * @param {String} id The UUID of the test. - * @param {any} func The test function. */ -global.it_id = (id, func) => { - if (testExclusionList.includes(id)) { - return xit; - } else { - return func || it; - } -}; - -/** - * Assign ID to test and run only this test. Disable test if its UUID is found in testExclusionList. - * @param {String} id The UUID of the test. - * @param {any} func The test function. - */ -global.fit_id = (id, func) => { - if (testExclusionList.includes(id)) { - return xit; - } else { - return func || fit; - } +global.it_id = id => { + return testFunc => { + if (testExclusionList.includes(id)) { + return xit; + } else { + return testFunc; + } + }; }; global.it_only_db = db => { diff --git a/spec/rest.spec.js b/spec/rest.spec.js index 922f9c3c10..d61c5232c5 100644 --- a/spec/rest.spec.js +++ b/spec/rest.spec.js @@ -247,7 +247,7 @@ describe('rest create', () => { }); }); - it_id('6c30306f-328c-47f2-88a7-2deffaee997f')('handles array, object, date', done => { + it_id('6c30306f-328c-47f2-88a7-2deffaee997f')(it)('handles array, object, date', done => { const now = new Date(); const obj = { array: [1, 2, 3], diff --git a/spec/schemas.spec.js b/spec/schemas.spec.js index a6198c117f..d02f081ccf 100644 --- a/spec/schemas.spec.js +++ b/spec/schemas.spec.js @@ -3650,7 +3650,7 @@ describe('schemas', () => { }); }); - it_id('5d0926b2-2d31-459d-a2b1-23ecc32e72a3')(it_exclude_dbs(['postgres'])('get indexes on startup', done => { + it_id('5d0926b2-2d31-459d-a2b1-23ecc32e72a3')(it_exclude_dbs(['postgres']))('get indexes on startup', done => { const obj = new Parse.Object('TestObject'); obj .save() @@ -3671,9 +3671,9 @@ describe('schemas', () => { done(); }); }); - })); + }); - it_id('9f2ba51a-6a9c-4b25-9da0-51c82ac65f90')(it_exclude_dbs(['postgres'])('get compound indexes on startup', done => { + it_id('9f2ba51a-6a9c-4b25-9da0-51c82ac65f90')(it_exclude_dbs(['postgres']))('get compound indexes on startup', done => { const obj = new Parse.Object('TestObject'); obj.set('subject', 'subject'); obj.set('comment', 'comment'); @@ -3706,9 +3706,9 @@ describe('schemas', () => { done(); }); }); - })); + }); - it_id('cbd5d897-b938-43a4-8f5a-5d02dd2be9be')(it_exclude_dbs(['postgres'])('cannot update to duplicate value on unique index', done => { + it_id('cbd5d897-b938-43a4-8f5a-5d02dd2be9be')(it_exclude_dbs(['postgres']))('cannot update to duplicate value on unique index', done => { const index = { code: 1, }; @@ -3737,6 +3737,6 @@ describe('schemas', () => { expect(error.code).toEqual(Parse.Error.DUPLICATE_VALUE); done(); }); - })); + }); }); }); diff --git a/spec/vulnerabilities.spec.js b/spec/vulnerabilities.spec.js index eb6253df71..5017fe7230 100644 --- a/spec/vulnerabilities.spec.js +++ b/spec/vulnerabilities.spec.js @@ -203,7 +203,7 @@ describe('Vulnerabilities', () => { ); }); - it_id('e8b5f1e1-8326-4c70-b5f4-1e8678dfff8d')('denies creating a hook with polluted data', async () => { + it_id('e8b5f1e1-8326-4c70-b5f4-1e8678dfff8d')(it)('denies creating a hook with polluted data', async () => { const express = require('express'); const bodyParser = require('body-parser'); const port = 34567;