Browse Source

js tester: trim injected code before removing it

content-update
Clement Denis 4 years ago
parent
commit
394127542b
  1. 2
      js/tests/test.mjs

2
js/tests/test.mjs

@ -61,7 +61,7 @@ const main = async () => {
const parts = test.split('// /*/ // ⚡')
const [inject, testCode] = parts.length < 2 ? ['', test] : parts
const combined = `${inject.trim()}\n${code
.replace(inject, '')
.replace(inject.trim(), '')
.trim()}\n${testCode.trim()}\n`
const b64 = Buffer.from(combined).toString('base64')

Loading…
Cancel
Save