Skip to content

Update tests with framework#16

Merged
tilfin merged 1 commit into
mainfrom
fix/tests-with-nyc
May 6, 2026
Merged

Update tests with framework#16
tilfin merged 1 commit into
mainfrom
fix/tests-with-nyc

Conversation

@tilfin
Copy link
Copy Markdown
Owner

@tilfin tilfin commented May 6, 2026

This pull request updates the test infrastructure to use Node.js's built-in test runner instead of Mocha, and makes related dependency and script changes. The main changes are grouped below:

Test framework migration:

  • Migrated all tests in test/index.test.js and test/index.test.mjs from Mocha to the Node.js built-in test runner by replacing context/it with describe/test, updating imports, and adapting test function signatures.
    Package and dependency updates:
  • Updated the test script in package.json to use node --test instead of Mocha, and removed the Mocha dependency.
  • Upgraded nyc to version 18.0.0 in package.json.

NPM configuration:

  • Added .npmrc file to ignore lifecycle scripts and set a minimum release age.

- Changed test command in package.json to use Node's built-in test runner.
- Updated devDependencies to use the latest version of NYC.
- Refactored test cases in index.test.js to use 'describe' and 'test' from 'node:test' instead of Mocha's 'context' and 'it'.
- Updated import statements in index.test.js and index.test.mjs to ensure compatibility with ES modules.

Co-authored-by: Copilot <copilot@github.com>
@tilfin tilfin merged commit 77abc64 into main May 6, 2026
3 checks passed
@tilfin tilfin deleted the fix/tests-with-nyc branch May 6, 2026 06:09
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