mirror of
https://github.com/Such-Software/wownerogue.git
synced 2026-11-29 10:23:55 +01:00
feat: productionize paid modes and PvP capture
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
const noStore = require('../src/middleware/noStore');
|
||||
|
||||
describe('authenticated API cache policy', () => {
|
||||
test('sets explicit no-store headers before continuing', () => {
|
||||
const headers = {};
|
||||
const response = {
|
||||
setHeader: jest.fn((name, value) => { headers[name] = value; })
|
||||
};
|
||||
const next = jest.fn();
|
||||
|
||||
noStore({}, response, next);
|
||||
|
||||
expect(headers).toEqual({
|
||||
'Cache-Control': 'no-store, max-age=0',
|
||||
Pragma: 'no-cache',
|
||||
Expires: '0'
|
||||
});
|
||||
expect(next).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user