Unleash / unleash-proxy-client-js

A browser client that can be used together with the unleash-proxy.
Apache License 2.0
44 stars 46 forks source link

fix: Update tests #147

Closed thomasheartman closed 1 year ago

thomasheartman commented 1 year ago

This PR does three things:

The new tests were brought on by #146

New tests

I've added two (three) new tests.

  1. src/util.test.ts: Verify that object properties set to null or undefined are excluded from query params
  2. 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.

Diffing with hidden whitespace is encouraged.