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

test: label tests dir as having sideEffects=true #105

Merged
merged 1 commit into from
Nov 10, 2024

Conversation

ChALkeR
Copy link
Contributor

@ChALkeR ChALkeR commented Nov 10, 2024

This package is labelled as sideEffects=false:

"type": "module",
"main": "index.js",
"module": "index.js",
"types": "index.d.ts",
"sideEffects": false,

That shouldn't apply to tests, because of:

  1. This bare import:
    import './ed25519.test.js';
  2. This setup (which is required):
    ed.etc.sha512Sync = (...m) => sha512(ed.etc.concatBytes(...m));

Adding sideEffects=true to the test dir makes tests suitable for running in bundled mode

To test:

  • npm test
  • CI
  • npx @exodus/test (Node.js)
  • npx @exodus/test --engine jsc:bundle --bundle-entropy-size=1000000 (JSC)
    Requires jsc available in PATH
  • npx @exodus/test --engine hermes:bundle --bundle-entropy-size=1000000 (Hermes)
    Requires hermes available in PATH or https://npmjs.com/hermes-engine-cli installed with @exodus/test:
    npm add @exodus/test hermes-engine-cli

Refs: paulmillr/noble-curves#166

@paulmillr paulmillr merged commit 8950233 into paulmillr:main Nov 10, 2024
5 checks passed
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.

2 participants