Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Migrate from jasmine-check to fast-check #2083

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 27, 2025
Merged

Migrate from jasmine-check to fast-check #2083

merged 3 commits into from
Mar 27, 2025

Conversation

jdeniau
Copy link
Member

@jdeniau jdeniau commented Mar 26, 2025

jasmine-check has no support since 7 years, is locking us on jest and force jest runner to be jest-jasmine.

fast-check has maintainance, and is test-framework agnostic. This way, we might migrate to vitest someday.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates the test suite from jasmine-check to fast-check to remove the dependency on an unsupported library while enabling potential future support for other test frameworks.

  • Removed jasmine-check and its installer in favor of fast-check.
  • Replaced all check.it calls with fc.assert(fc.property(…)) constructs.
  • Added a utility helper (expectToBeDefined) to ensure test helper consistency.

Reviewed Changes

Copilot reviewed 21 out of 23 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/zip.ts Updated tests from jasmine-check to fast-check usage.
tests/ts-utils.ts Added a helper to assert values are defined.
tests/transformerProtocol.ts Removed jasmine-check dependency.
tests/splice.ts Migrated splice tests to fast-check.
tests/slice.ts Revised slice tests with fast-check property-based testing.
tests/minmax.ts Replaced jasmine-check tests with fast-check; uses shuffle.
tests/join.ts Updated join tests with fast-check and adjusted error expectations.
tests/hash.ts Converted hash tests from jasmine-check to fast-check.
tests/flatten.ts Removed jasmine-check dependency.
tests/find.ts Removed jasmine-check dependency.
tests/Stack.ts Migrated Stack tests to fast-check style.
tests/Range.ts Updated Range tests to use fast-check with proper shrinking.
tests/Map.ts Revised Map tests; replaced jasmine-check with fast-check.
tests/List.ts Migrated List tests to fast-check with various property checks.
tests/KeyedSeq.ts Migrated KeyedSeq tests to fast-check.
tests/IndexedSeq.ts Removed jasmine-check dependency.
tests/Equality.ts Converted equality/hash tests to fast-check property-based tests.
tests/Conversion.ts Migrated conversion tests to fast-check and added appropriate type annotations.
Files not reviewed (2)
  • tests/tsconfig.json: Language not supported
  • package.json: Language not supported
Comments suppressed due to low confidence (1)

tests/minmax.ts:58

  • The function 'shuffle' is used in the test but there is no corresponding import or definition in this file. Please ensure that 'shuffle' is defined or imported from the appropriate utility module.
is(Seq(shuffle(vals.slice())).max(), Seq<number | string>(vals).max())

@jdeniau jdeniau merged commit 7364aea into main Mar 27, 2025
5 checks passed
@jdeniau jdeniau deleted the fast-check branch March 27, 2025 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant