Files
30-seconds-of-code/test/forEachRight/forEachRight.test.js
Angelos Chalaris 4f7da1be9b Test migration to jest by hand
Apparently using regular expressions is way easier.
2018-06-18 15:15:56 +03:00

13 lines
323 B
JavaScript

const expect = require('expect');
const forEachRight = require('./forEachRight.js');
test('forEachRight is a Function', () => {
expect(forEachRight).toBeInstanceOf(Function);
});
let output = '';
forEachRight([1, 2, 3, 4], val => output+=val);
t.equal(output, '4321', 'Iterates over the array in reverse');