Skip to content

Conversation

@ilteoood
Copy link

@ilteoood ilteoood commented Jan 10, 2026

This should close #336

Checklist

t.assert.ifError(err)
t.assert.strictEqual(res.payload, 'example.com:8080|foo=bar')
t.assert.deepStrictEqual(res.cookies, [
t.assert.deepStrictEqual(structuredClone(res.cookies), [
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is needed due to checks on the prototype. Even on main the test is failing:

✖ failing tests:

test at test/index.test.js:1669:1
✖ read cookie (2.574084ms)
  AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
  + actual - expected ... Lines skipped
  
    [
  +   [Object: null prototype] {
  -   {
        name: 'type',
        value: 'ninja'
      },
  +   [Object: null prototype] {
  -   {
        domain: '.home.com',
  ...
        value: 'me'
      }
    ]
      at assert.<computed> [as deepStrictEqual] (node:internal/test_runner/test:242:18)
      at /light-my-request/test/index.test.js:1683:14
      at /light-my-request/lib/response.js:37:28
      at process.processTicksAndRejections (node:internal/process/task_queues:77:11) {
    generatedMessage: true,
    code: 'ERR_ASSERTION',
    actual: [ { name: 'type', value: 'ninja' }, { name: 'dev', value: 'me', expires: 2020-01-17T20:26:08.000Z, maxAge: 1234, domain: '.home.com', path: '/wow', secure: true, httpOnly: true, sameSite: 'Strict' } ],
    expected: [ { name: 'type', value: 'ninja' }, { name: 'dev', value: 'me', expires: 2020-01-17T20:26:08.000Z, maxAge: 1234, domain: '.home.com', path: '/wow', secure: true, httpOnly: true, sameSite: 'Strict' } ],
    operator: 'deepStrictEqual'
  }

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina requested review from Eomm and jsumners January 11, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A way to set defaults of headers / query params

2 participants