mirror of
https://github.com/Such-Software/wownerogue.git
synced 2026-12-03 04:13:57 +01:00
Wownerogue
A browser-based roguelike synchronized with crypto block timing. A run is a race against the next block: reach the exit before the block lands, or the house wins. The same codebase runs the solo dungeon, the social Tavern, and operator-selected PvP and race rulesets, with separate free and paid leaderboards. Self-hostable under the MIT License. See README.md to run it, docs/ARCHITECTURE.md for the design, and docs/DEPLOY.md to operate an instance.
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