fix: Run wasm nodejs tests with no fails#2387
Conversation
mocha nodejs tests with no failswasm nodejs tests with no fails
|
Can you add a test:node command to the package.json? |
|
Hello @kevaundray
Yes, I will. I have a few thoughts about changes. I will try to improve the PR. |
|
Hello @kevaundray I have had two ideas how to make minimal changes. The minimal changes is the changed file tsc tests/node/index.test.ts
npm test The solution requires no additional dependencies and only change the commands in + "build:node": "tsc test/node/index.test.ts",
...
+ "test": "npm run build:node && env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha",The command I think that the second solution is a bit better than the current realization. What do you think? |
Second option sounds better -- also this seems like the logical thing to do |
I will switch to the package and add types to it. |
…e-resolver`, update type declaration
|
btw seems we are only testing browser here: noir/.github/workflows/wasm.yml Line 202 in 182d017 |
I'm trying to keep PRs with minimal changes. I've added the node testing in the commit. |
* master: feat(ssa): Reuse existing results for duplicated instructions with no side-effects (#2460) fix: Closure lvalue capture bugfix (#2457) feat: Syntax for environment types now works with generics (#2383) fix(parser): fixes for the parsing of 'where' clauses (#2430) fix: Run `wasm` nodejs tests with no fails (#2387)
|
Does this closes #2326? cc @kobyhallx |
Hello @Savio-Sou Since we have passed nodejs tests https://github.com/noir-lang/noir/actions/runs/6019172378/job/16328784396#step:8:3 we can close the issue. |
* master: (42 commits) fix(ssa): Handle right shift with constants (#2481) chore(noir): Release 0.10.4 (#2354) fix: Divide by zero should fail to satisfy constraints for `Field` and ints (#2475) fix(ssa): Remove padding from ToRadix call with constant inputs (#2479) fix: Implement handling of array aliasing in the mem2reg optimization pass (#2463) chore: resolve `Instruction` inputs fully before checking against cache (#2472) chore: Move independent `run_test` function into nargo core (#2468) feat: Standard library functions can now be called with closure args (#2471) feat(frontend): aztec syntactic sugar (feature flagged) (#2403) chore(ci): enforce compliance with `cargo fmt` (#2467) chore(ci): Allow releases to have additional feature flags (#2405) feat: Add `assert_eq` keyword (#2137) fix(ssa): Do not optimize for allocates in constant folding (#2466) feat(ssa): Reuse existing results for duplicated instructions with no side-effects (#2460) fix: Closure lvalue capture bugfix (#2457) feat: Syntax for environment types now works with generics (#2383) fix(parser): fixes for the parsing of 'where' clauses (#2430) fix: Run `wasm` nodejs tests with no fails (#2387) chore: Run `cargo fmt` (#2455) chore: Perform formatting changes to integration tests (#2448) ...
* master: (42 commits) fix(ssa): Handle right shift with constants (#2481) chore(noir): Release 0.10.4 (#2354) fix: Divide by zero should fail to satisfy constraints for `Field` and ints (#2475) fix(ssa): Remove padding from ToRadix call with constant inputs (#2479) fix: Implement handling of array aliasing in the mem2reg optimization pass (#2463) chore: resolve `Instruction` inputs fully before checking against cache (#2472) chore: Move independent `run_test` function into nargo core (#2468) feat: Standard library functions can now be called with closure args (#2471) feat(frontend): aztec syntactic sugar (feature flagged) (#2403) chore(ci): enforce compliance with `cargo fmt` (#2467) chore(ci): Allow releases to have additional feature flags (#2405) feat: Add `assert_eq` keyword (#2137) fix(ssa): Do not optimize for allocates in constant folding (#2466) feat(ssa): Reuse existing results for duplicated instructions with no side-effects (#2460) fix: Closure lvalue capture bugfix (#2457) feat: Syntax for environment types now works with generics (#2383) fix(parser): fixes for the parsing of 'where' clauses (#2430) fix: Run `wasm` nodejs tests with no fails (#2387) chore: Run `cargo fmt` (#2455) chore: Perform formatting changes to integration tests (#2448) ...
Description
Fix of testing process of crate
wasmProblem*
The nodejs tests of crate
wasmfail becausemochacannot resolve some imports.Mochathrows errorSummary*
The bug is fixed using alternative import and changed resolving of filepaths.
Documentation
wasmshould provide the documentation for building and testing processes.Additional Context
PR Checklist*
cargo fmton default settings.