You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Colby Russell f7535aaf26 Remove unused in-browser "message" event listener 10 months ago
example Fix how non-existent index.js is handled 3 years ago
src Remove unused in-browser "message" event listener 10 months ago
tests Start migrating in-browser JSON IPC to HTTP 10 months ago
ACKNOWLEDGEMENTS.txt Fix version number; bump to 0.9.9-pre 2 years ago
Build.app.htm Refactor to sync with trplkt v0.11.0 11 months ago
CHANGELOG.txt Release version 0.9.8 2 years ago
README.markdown Refactor for trplkt v0.11.0 11 months ago
main.src Refactor for trplkt v0.11.0 11 months ago

README.markdown

Simple JS test runner for simple JS projects.

Inaft doesn't rely on any dependencies or third-party package registry, nor does it need complex configuration or otherwise rely on familiarity with any given toolchain. Inaft is designed to be dropped directly into your project's source repo and still be able to run your tests 20 years from now.

Test conventions

With Inaft, adding tests to your project works like this:

  1. Copy Inaft's test runner into your tests/ (e.g., tests/harness.app.htm)
  2. Write your test (e.g., tests/foo/index.js)
  3. There is no step 3; you're ready to run your tests

No package.json, no devDependencies, no configuration needed.

For tests, Inaft chooses (more or less) plain ol' ES6 modules as its preferred format. A module is a test suite, and exceptions are test failures.

It even runs in the browser.

This all makes Inaft especially well-suited for JS projects that are not part of the NodeJS/NPM ecosystem. Having said that, the Inaft test runner is a polyglot file, so you can run it using NodeJS from the terminal, if that's what you prefer.

Building

Inaft is built with Build.app.htm (included in the repo root dir). Use it to run the following command:

build main.src -o harness.app.htm

Contributing

Add your name to ACKNOWLEDGEMENTS.txt, and use Build.app.htm to generate a new credits.src with the following command:

create-credits ./ACKNOWLEDGEMENTS.txt -o ./src/credits.src

License

This work is made available under the terms of the MIT License.

Copyright individual authors and contributors; see ACKNOWLEDGEMENTS.txt.