Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
test('render request', async t => {
const Session = getSession();
const app = new App('fake-element', el => el);
app.plugin(CsrfToken, {Session});
const ctx = await render(app, '/');
t.notok(
ctx.response.headers['x-csrf-token'],
'does not set x-csrf-token header'
);
t.equals(ctx.response.status, 200, 'has right status');
t.ok(Session.of(ctx).get('csrf-secret'), 'sets the session');
t.ok(
ctx.response.body.includes('