feat: productionize paid modes and PvP capture

This commit is contained in:
jwinterm
2026-07-21 20:41:27 -04:00
parent 8fb284f8ed
commit 89398335c7
230 changed files with 31755 additions and 2777 deletions
+20
View File
@@ -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);
});
});