Skip to content
This repository has been archived by the owner on Jun 30, 2020. It is now read-only.

Commit

Permalink
Add a test to ensure that String instances are not supported
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanHahn committed Sep 1, 2019
1 parent 8dbb3e5 commit d7a401f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ describe('crossdomain', () => {
it('cannot set the policy to invalid values', () => {
expect(() => { crossdomain({ permittedPolicies: '' }); }).toThrow();
expect(() => { crossdomain({ permittedPolicies: 'NONE' }); }).toThrow();
// eslint-disable-next-line @typescript-eslint/no-explicit-any
/* eslint-disable @typescript-eslint/no-explicit-any */
expect(() => { crossdomain({ permittedPolicies: null } as any); }).toThrow();
expect(() => { crossdomain({ permittedPolicies: new String('none') } as any); }).toThrow(); // eslint-disable-line no-new-wrappers
/* eslint-enable @typescript-eslint/no-explicit-any */
});

it('names its function and middleware', () => {
Expand Down

0 comments on commit d7a401f

Please sign in to comment.