Skip to content

bugfix

bugfix #382

This check has been archived and is scheduled for deletion. Learn more about checks retention
GitHub Actions / npm tests succeeded Sep 13, 2023 in 1s

npm tests ✅

Tests passed successfully

✅ testresults/vitest-junit.xml

29 tests were completed in 18s with 29 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
src/test/helpers/validation.test.ts 10✅ 10ms
src/test/services/fetch-logged-in.test.ts 2✅ 62ms
src/test/services/pagination/pagination.test.ts 3✅ 137ms
src/test/services/pagination/parsePagination.test.ts 2✅ 9ms
src/test/services/service-data-enricher.test.ts 3✅ 19ms
src/test/services/service-data/fromFetcher.test.ts 1✅ 25ms
src/test/services/service-data/fromPromise.test.ts 3✅ 10ms
src/test/services/service-data/fromSubmitter.test.ts 3✅ 32ms
src/test/stores/create-store.test.ts 2✅ 43ms

✅ src/test/helpers/validation.test.ts

src/test/helpers/validation.test.ts
  ✅ parseDutchDate > should allow dd/MM/yyyy
  ✅ parseDutchDate > should allow d/M/yyyy
  ✅ parseDutchDate > should allow dd-MM-yyyy
  ✅ parseDutchDate > should allow d-M-yyyy
  ✅ parseDutchDate > should allow ddMMyyyy
  ✅ parseDutchDate > should return an error on invalid date
  ✅ parseDutchDate > should return an error on a non-date
  ✅ parseBsn > should allow a valid bsn
  ✅ parseBsn > should return an error on an invalid bsn
  ✅ parseBsn > should return an error on an invalid bsn

✅ src/test/services/fetch-logged-in.test.ts

src/test/services/fetch-logged-in.test.ts
  ✅ fetchLoggedIn > should resolve when a 200 response is returned
  ✅ fetchLoggedIn > should retry when a 401 response is returned

✅ src/test/services/pagination/pagination.test.ts

src/test/services/pagination/pagination.test.ts
  ✅ renders correctly with empty result
  ✅ renders correctly with a single page
  ✅ renders correctly with more than 5 pages and current  page somewhere in between

✅ src/test/services/pagination/parsePagination.test.ts

src/test/services/pagination/parsePagination.test.ts
  ✅ parsePagination > should return a paginationobject when used with a synchronous mapper
  ✅ parsePagination > should return a paginationobject when used with a asynchronous mapper

✅ src/test/services/service-data-enricher.test.ts

src/test/services/service-data-enricher.test.ts
  ✅ service-data-enricher > should attempt to retrieve data of type Right, when the input is of type Left
  ✅ service-data-enricher > should attempt to retrieve data of type Left, when the input is of type Right
  ✅ service-data-enricher > should return the input, in side dictated by the isLeft function. If Isleft returns the wrong answer the other side wil be empty

✅ src/test/services/service-data/fromFetcher.test.ts

src/test/services/service-data/fromFetcher.test.ts
  ✅ ServiceResult.fromFetcher > should return a ServiceData instance and put in in a success state after a promise is resolved.

✅ src/test/services/service-data/fromPromise.test.ts

src/test/services/service-data/fromPromise.test.ts
  ✅ ServiceResult.fromPromise > should return a ServiceData instance and put in in a success state after a promise is resolved.
  ✅ ServiceResult.fromPromise > should return a ServiceData instance and put in in a loading state when a promise is pending.
  ✅ ServiceResult.fromPromise > should return a ServiceData instance and put in in a error state after a promise is resolved.

✅ src/test/services/service-data/fromSubmitter.test.ts

src/test/services/service-data/fromSubmitter.test.ts
  ✅ ServiceResult.fromSubmitter > should return a ServiceData instance and put in in a success state after a promise is resolved.
  ✅ ServiceResult.fromSubmitter > should return a ServiceData instance and put in in a loading state when a promise is pending.
  ✅ ServiceResult.fromSubmitter > should return a ServiceData instance and put in in a error state after a promise is resolved.

✅ src/test/stores/create-store.test.ts

src/test/stores/create-store.test.ts
  ✅ create-store > should hold the model provided by a statefactory
  ✅ create-store > should return to the initial state after a reset