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

✅(worker) Run tests against workers in ESM mode #4648

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

dubzzz
Copy link
Owner

@dubzzz dubzzz commented Jan 22, 2024

Category:

  • ✨ Introduce new features
  • 📝 Add or update documentation
  • ✅ Add or update tests
  • 🐛 Fix a bug
  • 🏷️ Add or update types
  • ⚡️ Improve performance
  • Other(s): ...

Potential impacts:

  • Generated values
  • Shrink values
  • Performance
  • Typings
  • Other(s): ...

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Copy link

codesandbox-ci bot commented Jan 22, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 76a2b5f:

Sandbox Source
@fast-check/examples Configuration

@dubzzz

This comment was marked as outdated.

@dubzzz

This comment was marked as outdated.

@dubzzz
Copy link
Owner Author

dubzzz commented Feb 16, 2024

It seems that when trying to open a worker in MJS mode, it crashes immediately because it cannot find the package for fast-check.

new w.Worker(new URL('file:///workspaces/fast-check/packages/worker/test/e2e/__properties__/passing.mjs'))
// Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'fast-check' imported from /workspaces/fast-check/packages/worker/test/e2e/__properties__/passing.mjs
//     at packageResolve (node:internal/modules/esm/resolve:844:9)
//     at moduleResolve (node:internal/modules/esm/resolve:901:20)
//     at defaultResolve (node:internal/modules/esm/resolve:1121:11)
//     at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:396:12)
//     at ModuleLoader.resolve (node:internal/modules/esm/loader:365:25)
//     at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:240:38)
//     at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39)
//     at link (node:internal/modules/esm/module_job:84:36)

I imagine something around how packages get installed with Yarn.

@dubzzz
Copy link
Owner Author

dubzzz commented Feb 16, 2024

It works fine in a yarn node context 🤔

Copy link

stale bot commented Apr 22, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 22, 2024
@dubzzz
Copy link
Owner Author

dubzzz commented Apr 22, 2024

Plop

@dubzzz dubzzz removed the stale label Apr 25, 2024
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