What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-06 12:57:02
javascript unit test
// JEST UNIT TESTING // INSTALL `yarn add --dev jest` // FUNCTION TO UNIT TEST function sum(a, b) { return a + b; } module.exports = sum; // sum.js // JEST SUM TEST const sum = require('./sum'); test('adds 1 + 2 to equal 3', () => { expect(sum(... Add solution
Best helpers
User 768576
+10
Viki
+5
Riptiki
+5
Suraj tiwari
+5
Bmcl
+5
Nuno
+5
AllenG
+5
Hugh Zang
+5
Marcel Souza
+5
Rosey28
+5