Skip to content

Commit

Permalink
Add test changes
Browse files Browse the repository at this point in the history
  • Loading branch information
connorpgpmcelroy committed Nov 19, 2024
1 parent 4a6ccb8 commit 5d48a4f
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/common/util/contentSecurityPolicy.spec.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import { getContentSecurityPolicy } from './'
import { SECURITY_POLICY } from './contentSecurityPolicy';
import { SECURITY_POLICY } from './contentSecurityPolicy'
/**
* Same as isStringPatternMatch() but testing with multiple strings
*/
describe('getContentSecurityPolicy(helmet)', () => {
it("should correctly call the content security policy", () => {
const helmet: any = {contentSecurityPolicy: (policy: any) => {return policy}}
expect(getContentSecurityPolicy(helmet)).toBe(SECURITY_POLICY)
});
})
it('should correctly call the content security policy', () => {
const helmet: any = {
contentSecurityPolicy: (policy: any) => {
return policy
},
}
expect(getContentSecurityPolicy(helmet)).toBe(SECURITY_POLICY)
})
})

0 comments on commit 5d48a4f

Please sign in to comment.