Skip to content

Commit f6c08ba

Browse files
committed
test: fix flaky test
1 parent 1e4cc72 commit f6c08ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/express-csp-header/tests/index.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ test('should set req.nonce and res.locals.nonce', () => {
4747
expect(res.locals).toHaveProperty('nonce');
4848
expect(req).toHaveProperty('nonce');
4949
expect(req.nonce).toEqual(res.locals.nonce);
50-
expect(res.headers['Content-Security-Policy']).toMatch(new RegExp(`^script-src \'nonce-${req.nonce}\';`));
50+
expect(res.headers['Content-Security-Policy']).toEqual(`script-src \'nonce-${req.nonce}\';`);
5151
});
5252

5353
describe('report-uri', () => {

0 commit comments

Comments
 (0)