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:
@ -1,5 +0,0 @@
|
||||
const dropRightWhile = (arr, func) => {
|
||||
while (arr.length > 0 && !func(arr[arr.length - 1])) arr = arr.slice(0, -1);
|
||||
return arr;
|
||||
};
|
||||
module.exports = dropRightWhile;
|
||||
@ -1,14 +0,0 @@
|
||||
const test = require('tape');
|
||||
const dropRightWhile = require('./dropRightWhile.js');
|
||||
|
||||
test('Testing dropRightWhile', (t) => {
|
||||
//For more information on all the methods supported by tape
|
||||
//Please go to https://github.com/substack/tape
|
||||
t.true(typeof dropRightWhile === 'function', 'dropRightWhile is a Function');
|
||||
t.deepEqual(dropRightWhile([1, 2, 3, 4], n => n < 3), [1, 2], 'Removes elements from the end of an array until the passed function returns true.');
|
||||
//t.deepEqual(dropRightWhile(args..), 'Expected');
|
||||
//t.equal(dropRightWhile(args..), 'Expected');
|
||||
//t.false(dropRightWhile(args..), 'Expected');
|
||||
//t.throws(dropRightWhile(args..), 'Expected');
|
||||
t.end();
|
||||
});
|
||||
Reference in New Issue
Block a user