Migrated tests to jest
Used jest-codemods to migrate, will have to pass everything by hand before we can merge.
This commit is contained in:
6
test2/forEachRight/forEachRight.js
Normal file
6
test2/forEachRight/forEachRight.js
Normal file
@@ -0,0 +1,6 @@
|
||||
const forEachRight = (arr, callback) =>
|
||||
arr
|
||||
.slice(0)
|
||||
.reverse()
|
||||
.forEach(callback);
|
||||
module.exports = forEachRight;
|
||||
11
test2/forEachRight/forEachRight.test.js
Normal file
11
test2/forEachRight/forEachRight.test.js
Normal file
@@ -0,0 +1,11 @@
|
||||
const expect = require('expect');
|
||||
const forEachRight = require('./forEachRight.js');
|
||||
|
||||
test('Testing forEachRight', () => {
|
||||
//For more information on all the methods supported by tape
|
||||
//Please go to https://github.com/substack/tape
|
||||
expect(typeof forEachRight === 'function').toBeTruthy();
|
||||
let output = '';
|
||||
forEachRight([1, 2, 3, 4], val => output+=val);
|
||||
expect(output).toBe('4321');
|
||||
});
|
||||
Reference in New Issue
Block a user