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

Support Jest fuzz tests written in TypeScript #449

Merged
merged 7 commits into from
Jun 15, 2023

Conversation

bertschneider
Copy link
Contributor

Many projects in the JavaScript ecosystem are actually developed in TypeScript. Usually these projects use Jest to directly execute tests also written in TypeScript via appropriate on-the-fly transpilers (e.g. ts-jest).

To prevent a dedicated transpilation step of the tests when using Jazzer.js, support for directly executing Jest fuzz tests written in TypeScript is added.

@bertschneider bertschneider force-pushed the FUZZ-567-jest-typescript branch 3 times, most recently from 531cea1 to 5713036 Compare May 26, 2023 06:47
@bertschneider bertschneider requested a review from a team May 26, 2023 06:55
Copy link
Contributor

@oetr oetr left a comment

Choose a reason for hiding this comment

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

What a great contribution, thank you! I only have some minor remarks.

packages/instrumentor/SourceMapRegistry.ts Show resolved Hide resolved
packages/instrumentor/instrument.ts Outdated Show resolved Hide resolved
packages/jest-runner/jest-extension.ts Show resolved Hide resolved
tests/code_coverage/coverage.test.js Show resolved Hide resolved
docs/jest-integration.md Outdated Show resolved Hide resolved
docs/jest-integration.md Show resolved Hide resolved
docs/jest-integration.md Outdated Show resolved Hide resolved
docs/jest-integration.md Outdated Show resolved Hide resolved
@bertschneider bertschneider force-pushed the FUZZ-567-jest-typescript branch 3 times, most recently from 9d421d4 to c8e5d2d Compare June 2, 2023 14:20
Jest script transformer uses the configured Jest extensions, like
ts-jest, and allows us to load more file formats.
Loaded sources could already contain inline source maps, e.g. if they
were loaded by ts-jest, which need to be forwarded to the internal
transformers. Otherwise the resulting coverage report would be off.
Copy link
Contributor

@oetr oetr left a comment

Choose a reason for hiding this comment

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

LGTM

@bertschneider bertschneider merged commit 2055674 into main Jun 15, 2023
6 checks passed
@bertschneider bertschneider deleted the FUZZ-567-jest-typescript branch June 15, 2023 14:38
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.

None yet

2 participants