Releases: japa/core
Allow context to be configurable at suite level and remove assert module
- refactor: make context configurable at suite level as well 0a1210c
- refactor: remove assert in favor of dedicated assert package 304d1f7
Use the https://github.com/japa/assert package for assertions
Make test context configurable and decoupling assert from context
- refactor: allow custom context for tests 56062cb
Stepping stone for v5
Japa is getting a rewrite with a new core, a standalone test runner and proper docs website. Please wait for the final release for the documentation.
The new package is published under @japa/core
Support ES modules and drop Node 10/12 support
Remove support for Node versions before 14.17.0 and add support for ES modules. You can enable ESM support as follows.
import japa from 'japa'
japa.configure({
files: ['test/**/*.spec.js'],
experimentalEsmSupport: true
})
- chore: update np d7dccef
- docs(README): document experimentalEsmSupport flag 33ea661
- chore: move husky hooks to .husky dir 6a6a672
- ci: use github actions 7c78b7a
- feat: add support for importing esm files 5052742
- style: fix linting errors bb9e2ca
- chore(deps): bump trim-newlines from 3.0.0 to 3.0.1 (#37) 709b85b
- chore(deps): bump glob-parent from 5.1.1 to 5.1.2 (#36) 3d57d20
- chore(deps): bump hosted-git-info from 2.8.8 to 2.8.9 (#35) f64cd4f
- chore(deps): bump minimist from 1.2.0 to 1.2.5 (#18) 928137c
- chore(deps): bump handlebars from 4.7.6 to 4.7.7 (#34) 72d2395
- improvement: add coverage section (#32) 70bc520
- chore(deps): bump dot-prop from 4.2.0 to 4.2.1 (#28) c43ac52
- chore(deps): bump ini from 1.3.5 to 1.3.7 (#27) 79d787c
- refactor: use String.prototype.padEnd instead of right-pad (#20) b2bb8fe
New Contributors
- @targos made their first contribution in #20
- @dependabot made their first contribution in #27
- @LeCoupa made their first contribution in #32
Full Changelog: v3.1.1...v4.0.0
Using jest diff over variable diff
- improvement: use jest-diff over variable-diff ce6e80b
Adding support for test.only
- chore: add todo file 87d4f24
- improvement: add first class support inside group for test.only d5bb6a9
- improvement: group does not execute hooks when no tests are defined 014c9bb
- chore: update meta files afb0d63
- chore: remove ow 78fc276
- feat: add test.only method to run a single test 311a092
- chore: update dependencies 5522ad6
Fixing skip in CI
- chore(package): update dependencies d83c47c
Dropping support for Node 8&9
Moving forward, Japa support Node.js 10.15.3
and above. It was required to keep the dependencies up to date and free from vulnerabilities.
Big bang re-write 🎉
Japa 2.0 is out with a Big Bang re-write. The end-user API is more or less same. However, the core has been moved to Typescript and is smaller, and faster than earlier.
Big wins
-
Moved to Typescript. Which means, now you can enjoy autocomplete when writing tests.
-
The core is simpler, leaner and marginally faster than the older versions.
-
In-built support to run multiple test files, without any CLI.
Improvements
-
The flow of tests and hooks is more streamlined and explained here.
-
Now tests relying on
done
callback, can also use theawait
keyword.test('process one job at a time', async (assert, done) => { queue.on('job', (data) => { assert.deepEqual(data, {}) done() }) await queue.run() })
-
Better support for
grep
. Earlier it has to be a substring of the test title. Now you can defineRegExp
too.const { configure } = require('japa') configure({ grep: 'users' }) // or regex like string configure({ grep: 'user(s)?' }) // even regex configure({ grep: /user(s)?/ })
Breaking changes
- The need of japa-cli has been removed. We recommend using a
master test file
and configure the tests using the configure method. - Calling
test.timeout
at a global level doesn't work anymore and again theconfigure
method can be used to define the global timeout for all the tests. - The module
japa/cli
has been removed. This was used by the CLI to interact with the Japa core and hence is not required. - The structure of
japa/api
has been changed too.
First Version
The first version with all the goodness