fastify / fastify-request-context

Request-scoped storage support, based on Asynchronous Local Storage (with fallback to cls-hooked)
MIT License
153 stars 13 forks source link

`defaultStoreValues()` is sent the `request` #157

Closed voxpelli closed 1 year ago

voxpelli commented 1 year ago

This PR fixes #156 by adding the current request instance as a parameter to the defaultStoreValues() factory

Checklist

voxpelli commented 1 year ago

Test is missing

One question on this: In which of the three test files should tests preferably be added?

There seems to be e2e tests that's run in both jest and tap? + non-e2e tests in jest?

kibertoad commented 1 year ago

@voxpelli e2e is preferable

voxpelli commented 1 year ago

@kibertoad Should it be added in both the jest and tap ones then? I see that tap tests were added in #50 since jest tests were failing, now they all pass for me locally at least

kibertoad commented 1 year ago

@voxpelli yeah, jest problem was fixed later. either of them or both would be good, I would err on the side of more jest tests

voxpelli commented 1 year ago

@kibertoad Tests added

kibertoad commented 1 year ago

Thank you!