diff --git a/js/tests/test.mjs b/js/tests/test.mjs index 13697def2..c6b3ac46f 100644 --- a/js/tests/test.mjs +++ b/js/tests/test.mjs @@ -25,9 +25,12 @@ const { join } = [] const { split } = '' const eq = (a, b) => { const noSplit = !''.split + const noJoin = ![].join String.prototype.split = split + String.prototype.split = join deepStrictEqual(a, b) noSplit && (String.prototype.split = undefined) + noJoin && (Array.prototype.join = undefined) return true }