0.0.17 • Published 5 months ago

@jrc03c/fake-jest v0.0.17

Weekly downloads
-
License
-
Repository
github
Last release
5 months ago

Introduction

This package is a temporary stand-in for Jest, which doesn't currently support ES modules (I think).

Installation

npm install --save-dev @jrc03c/fake-jest

Usage

Step 1: Write a test file:

// my-cool-function.test.mjs
import { afterAll, beforeAll, expect, test } from "./index.mjs"
import { myCoolFunction } from "./my-cool-function.mjs"

beforeAll(() => {
  // set up
})

afterAll(() => {
  // tear down
})

test("that `myCoolFunction` works as expected", () => {
  expect(() => myCoolFunction()).not.toThrow()
})

Step 2a: Run the tests in my-cool-function.test.mjs by running it as a normal Node script:

node path/to/my-cool-function.test.mjs

...or by invoking the fake-jest executable and passing the path as an argument:

npx fake-jest path/to/my-cool-function.test.mjs

Step 2b: To run all tests in a project, invoke the fake-jest executable with no arguments:

npx fake-jest
0.0.13

11 months ago

0.0.14

11 months ago

0.0.15

8 months ago

0.0.16

8 months ago

0.0.17

5 months ago

0.0.12

1 year ago

0.0.11

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.2

1 year ago