wKovacs64 / hibp

An unofficial TypeScript SDK for the 'Have I been pwned?' service.
https://wkovacs64.github.io/hibp
MIT License
113 stars 5 forks source link

test: refactor some tests #423

Closed wKovacs64 closed 1 year ago

wKovacs64 commented 1 year ago

Some of the fetchFromApi tests were there out of a desire to be DRY, but they've been duplicated and moved to their respective modules where the behavior should actually be tested. As fetchFromApi is just an implementation detail, the module-level behavior would need to remain the same even if fetchFromApi was replaced.

The same argument could be made for some (if not all?) of the remaining fetchByApi tests, but I'm not going to bother with those right now.

changeset-bot[bot] commented 1 year ago

⚠️ No Changeset found

Latest commit: e780a874848e663b19c4dce7ad06db5423211a3a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR