mirror of https://github.com/01-edu/public.git
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.
15 lines
401 B
15 lines
401 B
5 years ago
|
String.prototype.repeat = undefined
|
||
|
// /*/ // ⚡
|
||
|
export const tests = []
|
||
|
const t = (f) => tests.push(f)
|
||
|
|
||
|
t(() => typeof repeat === 'function')
|
||
|
t(() => repeat.length === 2)
|
||
|
t(() => repeat('a', 3) === 'aaa')
|
||
|
t(() => repeat('ba', 10) === 'babababababababababa')
|
||
|
t(() => repeat('pouet', 2) === 'pouetpouet')
|
||
|
t(() => repeat('haha', 1) === 'haha')
|
||
|
t(() => repeat('hehehe', 0) === '')
|
||
|
|
||
|
Object.freeze(tests)
|