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.
16 lines
566 B
16 lines
566 B
5 years ago
|
String.prototype.split = undefined
|
||
|
String.prototype.match = undefined
|
||
|
RegExp.prototype.exec = undefined
|
||
|
Array.prototype.join = undefined
|
||
|
// /*/ // ⚡
|
||
|
export const tests = []
|
||
|
const t = (f) => tests.push(f)
|
||
|
|
||
|
t(({ eq }) => eq(split('a b c', ' '), ['a', 'b', 'c']))
|
||
|
t(({ eq }) => eq(split('ggg - ddd - b', ' - '), ['ggg', 'ddd', 'b']))
|
||
|
t(({ eq }) => eq(split('ee,ff,g,', ','), ['ee', 'ff', 'g', '']))
|
||
|
|
||
|
t(() => join(['ee', 'ff', 'g', ''], ',') === 'ee,ff,g,')
|
||
|
t(() => join(['ggg', 'ddd', 'b'], ' - ') === 'ggg - ddd - b')
|
||
|
t(() => join(['a', 'b', 'c'], ' ') === 'a b c')
|