Skip to content
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

fix(diff): last test generation #3910

Merged
merged 1 commit into from
Dec 18, 2022
Merged

Conversation

nicojs
Copy link
Member

@nicojs nicojs commented Dec 18, 2022

Fix a bug in the diffing algorithm where, running in --incremental mode, the test file would always be marked as 'changed' when it contained tests generated using a function, which was the last in the file.

For example:

import { add } from "../add.js";

test.each`
  x    | y    | expected
  ${1} | ${1} | ${2}
  ${1} | ${2} | ${3}
  ${2} | ${2} | ${4}
`("add($x, $y) = $expected", ({ x, y, expected }) => {
  expect(add(x, y)).toBe(expected);
});

Closes #3909

Allow the last test in a test file to be generated using a function
@nicojs nicojs enabled auto-merge (squash) December 18, 2022 10:59
@nicojs nicojs merged commit f88b038 into master Dec 18, 2022
@nicojs nicojs deleted the fix/diff-last-test-generation branch December 18, 2022 11:22
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.

Some tests not skipped in incremental mode.
1 participant