0.1.0 • Published 5 years ago

@jitesoft/microtest v0.1.0

Weekly downloads
6
License
MIT
Repository
gitlab
Last release
5 years ago

MicroTest

No framework test framework!

This is actually just a few methods throwing errors in case of test failures. No test counting, no coverage no nothing, just test!

Why?

During automated client-side testing, we required a minimal test helper to throw errors on failures.

What?

MicroTest exposes the following methods on the MicroTest object:

throws
throwsSync
notThrows
notThrowsSync
isType
isInstance
isEqual

There are three files you may use to test:

  • dist/index.js, built to run on latest JS engines (latest 1 version of chrome and firefox).
  • dist/index-compat.js, built to run on most modern browsers.
  • src/index.js, original source.

When?

June 8'th 4:30 PM. Not before, not after.

How?

If including it as source via import, use the exported methods right away:

import {throws} from '@jitesoft/microtest';
await throws(() => {
  throw new Error('Error plx!');
})

If using one of the dist files, the MicroTest object is populated with all of the methods:

await MicroTest.throws(() => {
  throw new Error('Error plx!');
});
0.1.0

5 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago