ci: Find duplicate and slow tests (#9188)

This commit is contained in:
Diamond Lewis
2024-07-16 03:34:10 -05:00
committed by GitHub
parent 872b9eb47b
commit e355f36ed4
13 changed files with 43 additions and 170 deletions

View File

@@ -469,29 +469,6 @@ describe('AuthenticationProviders', function () {
expect(providerOptions).toEqual(options.facebook);
});
it('should throw error when Facebook request appId is wrong data type', async () => {
const httpsRequest = require('../lib/Adapters/Auth/httpsRequest');
spyOn(httpsRequest, 'get').and.callFake(() => {
return Promise.resolve({ id: 'a' });
});
const options = {
facebook: {
appIds: 'abcd',
appSecret: 'secret_sauce',
},
};
const authData = {
access_token: 'badtoken',
};
const { adapter, appIds, providerOptions } = authenticationLoader.loadAuthAdapter(
'facebook',
options
);
await expectAsync(adapter.validateAppId(appIds, authData, providerOptions)).toBeRejectedWith(
new Parse.Error(Parse.Error.OBJECT_NOT_FOUND, 'appIds must be an array.')
);
});
it('should handle Facebook appSecret for validating appIds', async () => {
const httpsRequest = require('../lib/Adapters/Auth/httpsRequest');
spyOn(httpsRequest, 'get').and.callFake(() => {
@@ -1652,7 +1629,7 @@ describe('apple signin auth adapter', () => {
}
});
it('(using client id as string) should throw error with with invalid jwt issuer', async () => {
it('(using client id as string) should throw error with with invalid jwt issuer with token', async () => {
const fakeClaim = {
iss: 'https://not.apple.com',
sub: 'the_user_id',
@@ -2208,7 +2185,7 @@ describe('facebook limited auth adapter', () => {
}
});
it('(using client id as string) should throw error with with invalid jwt issuer', async () => {
it('(using client id as string) with token', async () => {
const fakeClaim = {
iss: 'https://not.facebook.com',
sub: 'the_user_id',