depfu[bot] on update
Update eslint-config-prettier t… (compare)
depfu[bot] on update
Update eslint-plugin-markdown t… (compare)
depfu[bot] on update
depfu[bot] on update
Update karma to version 6.1.1 (compare)
depfu[bot] on update
depfu[bot] on update
Update karma to version 6.1.0 (compare)
depfu[bot] on update
{}
to a new Map()
, you will have weird results because the properties attached to the Map object will be checked rather than the .set()
mappings it contains
./test/*.js
, and with the --recursive
option it will use the equivalent of ./test/**/*.js
. I'd like to change that to **/test/*.js
and ideally through configuration. I cannot find anything about it in the docs nor on the website. Do you have any clue about how to do that?
import unexpected from 'unexpected';
import unexpectedExpress from 'unexpected-express';
import express from 'express';
import { partnerAdsTrackingMiddleware } from './partnerAdsTrackingMiddleware';
const expect = unexpected.clone().use(unexpectedExpress);
const app = express()
.use(partnerAdsTrackingMiddleware())
.use((req, res) => res.send('OK'));
describe('partnerAdsTrackingMiddleware', () => {
it('should not set a cookie when no partner information is present', () => {
expect(app, 'to yield exchange', {
request: 'GET /?paid=foo&pacid=bar',
response: {
statusCode: 999,
},
});
});
});
const context = await expect(app, 'to yield exchange', ...)
and then context.httpResponse.headers.getAll('Set-Cookie')
Error: unexpected-express: Response object specification incomplete.
Set-Cookie
headers and passing parameters to functions: it('should filter unknown values out of cookie value', async () => {
await expect(app, 'to yield exchange', {
request: 'GET /?paid=foo&pacid=bar&unknown=1234',
response: {
headers: {
'Set-Cookie': expect.it(
'when passed as parameter to',
parse,
'to satisfy',
[
{
name: 'partner-ads',
value: expect.it(
'when passed as parameter to',
JSON.parse,
'to satisfy',
{ paid: 'foo', pacid: 'bar' }
),
maxAge: 3456000,
path: '/',
sameSite: 'Lax',
},
]
),
},
},
});
});