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
+10
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5