Skip to content

Commit c0cff26

Browse files
author
Kadi Kraman
committed
Remove scope validation from tests
1 parent 8cd3aaa commit c0cff26

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

index.spec.js

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -78,18 +78,6 @@ describe('AppAuth', () => {
7878
}).toThrow('Config error: clientId must be a string');
7979
});
8080

81-
it('throws an error when no scopes are passed in', () => {
82-
expect(() => {
83-
authorize({ ...config, scopes: undefined });
84-
}).toThrow('Scope error: please add at least one scope');
85-
});
86-
87-
it('throws an error when an empty scope array is passed in', () => {
88-
expect(() => {
89-
authorize({ ...config, scopes: [] });
90-
}).toThrow('Scope error: please add at least one scope');
91-
});
92-
9381
it('calls the native wrapper with the correct args on iOS', () => {
9482
authorize(config);
9583
expect(mockAuthorize).toHaveBeenCalledWith(
@@ -206,18 +194,6 @@ describe('AppAuth', () => {
206194
}).toThrow('Please pass in a refresh token');
207195
});
208196

209-
it('throws an error when no scopes are passed in', () => {
210-
expect(() => {
211-
refresh({ ...config, scopes: undefined }, { refreshToken: 'such-token' });
212-
}).toThrow('Scope error: please add at least one scope');
213-
});
214-
215-
it('throws an error when an empty scope array is passed in', () => {
216-
expect(() => {
217-
refresh({ ...config, scopes: [] }, { refreshToken: 'such-token' });
218-
}).toThrow('Scope error: please add at least one scope');
219-
});
220-
221197
it('calls the native wrapper with the correct args on iOS', () => {
222198
refresh({ ...config }, { refreshToken: 'such-token' });
223199
expect(mockRefresh).toHaveBeenCalledWith(

0 commit comments

Comments
 (0)