1.0.10 ā€¢ Published 2 years ago

fran-testing-library v1.0.10

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Getting Started

Install fran-testing-library using npm

npm install fran-testing-library

Fran testing library does not need any configuration to start.

Let's start by writing a test for a function that adds two numbers. First, create a sum.js file:

function sum(a, b) {
  return a + b;
}
module.exports = sum;

Then, create a file named sum.test.js. This will contain our actual test:

const sum = require("./sum");

test("adds 1 + 2 to equal 3", () => {
  expect(sum(1, 2)).toBe(3);
});

Add the following section to your package.json:

{
  "scripts": {
    "test": "npx fran"
  }
}

You can also run npx fran directly

Finally, run npm test or npx fran and fran-testing-library will print this message:

PASS  ./sum.test.js
āœ“ adds 1 + 2 to equal 3 (5ms)

You just successfully wrote your first test using fran-testing-library!

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago