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

Automated tests for JS modules #44

Closed
5 tasks done
Tracked by #8
bajtos opened this issue Feb 13, 2023 · 0 comments
Closed
5 tasks done
Tracked by #8

Automated tests for JS modules #44

bajtos opened this issue Feb 13, 2023 · 0 comments
Assignees
Labels
feature New feature or request modules:javascript Things related to writing modules in JavaScript

Comments

@bajtos
Copy link
Member

bajtos commented Feb 13, 2023

Make it easy for module authors to write automated tests for their modules.

We need this functionality too for writing our internal tests for Zinnia JS APIs.

See https://deno.land/manual@v1.30.3/basics/testing

Features to consider:

  • framework (API to define tests, test runner, test reporter)
    • collect test files
    • register all test suites (describe) and tests (it)
    • execute the tests
    • report test results
  • CLI, e.g zinnia test
  • Documentation for module authors.
  • Unit-testing vs integration testing.
  • Usability features
    • Run only a subset of tests
      • All tests in a single file (mocha test/file.js)
      • All tests matching a pattern (mocha -g regex)
      • Skip tests (it.skip and describe.skip)
      • Run only tests selected in code (it.only)

See https://deno.land/manual@v1.30.3/basics/testing for inspiration.

A Mastodon thread about DX aspects of JS testing frameworks: https://mastodon.social/@jamesshore@mastodon.online/110345771809205197

Out of scope

Subtasks

Estimate: Time-boxed to 2-3 days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request modules:javascript Things related to writing modules in JavaScript
Projects
Status: ✅ done
Development

No branches or pull requests

1 participant