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:
11
test4/join/join.js
Normal file
11
test4/join/join.js
Normal file
@ -0,0 +1,11 @@
|
||||
const join = (arr, separator = ',', end = separator) =>
|
||||
arr.reduce(
|
||||
(acc, val, i) =>
|
||||
i === arr.length - 2
|
||||
? acc + val + end
|
||||
: i === arr.length - 1
|
||||
? acc + val
|
||||
: acc + val + separator,
|
||||
''
|
||||
);
|
||||
module.exports = join;
|
||||
Reference in New Issue
Block a user