You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

13 lines
431 B

export const tests = []
const t = (f) => tests.push(f)
t(() => typeof concatStr === 'function', 'Should be a function')
t(() => concatStr.length === 2, 'Should takes 2 arguments')
t(() => concatStr('a', 'b') === 'ab')
t(() => concatStr('yolo', 'swag') === 'yoloswag')
// handle non strings correctly
t(() => concatStr(1, 2) === '12')
t(() => concatStr(concatStr, concatStr) === String(concatStr).repeat(2))
Object.freeze(tests)