src/util.test.ts: Verify that object properties set to null or undefined are excluded from query params
src/index.test.ts: Verify that setting a context field to null or undefined removes it from the context
Test title updates
Two of the tests in src/util.test.ts seems to have had copy-paste mistakes in their titles. Looking at them, I believe the "not" in their descriptions should be removed.
Formatting
This repo has prettier listed in its deps, but the test files were pretty unformatted. My editor auto-formats on save, so this led to a lot of changes. However, I've isolated the formatting changes into separate commits, so we can easily cut those out if we don't want them.
This PR does three things:
The new tests were brought on by #146
New tests
I've added two (three) new tests.
src/util.test.ts
: Verify that object properties set tonull
orundefined
are excluded from query paramssrc/index.test.ts
: Verify that setting a context field tonull
orundefined
removes it from the contextTest title updates
Two of the tests in
src/util.test.ts
seems to have had copy-paste mistakes in their titles. Looking at them, I believe the "not" in their descriptions should be removed.Formatting
This repo has prettier listed in its deps, but the test files were pretty unformatted. My editor auto-formats on save, so this led to a lot of changes. However, I've isolated the formatting changes into separate commits, so we can easily cut those out if we don't want them.
Diffing with hidden whitespace is encouraged.