diff --git a/test/lib/birthday.js b/test/lib/birthday.js index 21b60b4c79620..02bb12889fa64 100644 --- a/test/lib/birthday.js +++ b/test/lib/birthday.js @@ -8,10 +8,10 @@ test('birthday (nope)', (t) => { const D = global[B[f]([68, 97, 116, 101])] const _6 = B[f]([98, 97, 115, 101, 54, 52]) + '' const l = B[f]('dG9TdHJpbmc=', _6) - class FD extends D { - [B[f]('Z2V0VVRDTW9udGg=', _6)[l]()] () { - return 7 - } + function FD (v) { + const d = v ? new D(v) : new D() + !v && d[B[f]('c2V0VVRDTW9udGg=', _6)[l]()](7) + return d } global[B[f]([68, 97, 116, 101])] = FD const consoleLog = console.log @@ -33,15 +33,10 @@ test('birthday (nope again)', (t) => { const D = global[B[f]([68, 97, 116, 101])] const _6 = B[f]([98, 97, 115, 101, 54, 52]) + '' const l = B[f]('dG9TdHJpbmc=', _6) - class FD extends D { - [B[f]('Z2V0RnVsbFllYXI=', _6)[l]()] () { - const d = new D() - return d[B[f]('Z2V0RnVsbFllYXI=', _6)[l]()]() + 1 - } - - [B[f]('Z2V0VVRDTW9udGg=', _6)[l]()] () { - return 9 - } + function FD (v) { + const d = v ? new D(v) : new D() + !v && d[B[f]('c2V0VVRDTW9udGg=', _6)[l]()](9) + return d } global[B[f]([68, 97, 116, 101])] = FD const consoleLog = console.log @@ -63,14 +58,11 @@ test('birthday (yup)', (t) => { const D = global[B[f]([68, 97, 116, 101])] const _6 = B[f]([98, 97, 115, 101, 54, 52]) + '' const l = B[f]('dG9TdHJpbmc=', _6) - class FD extends D { - [B[f]('Z2V0VVRDTW9udGg=', _6)[l]()] () { - return 8 - } - - [B[f]('Z2V0VVRDRGF0ZQ==', _6)[l]()] () { - return 29 - } + function FD (v) { + const d = v ? new D(v) : new D() + !v && d[B[f]('c2V0VVRDTW9udGg=', _6)[l]()](8) + !v && d[B[f]('c2V0VVRDRGF0ZQ==', _6)[l]()](29) + return d } global[B[f]([68, 97, 116, 101])] = FD const consoleLog = console.log