Skip to content

Commit

Permalink
enable tests that should have been enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
evanw committed Nov 30, 2021
1 parent cd6c890 commit 90f3449
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions scripts/end-to-end-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,8 @@
if (\`\${obj}c\` !== 'bc') throw 'fail'
if (\`a\${obj}c\` !== 'abc') throw 'fail'
`,
}),
test(['in.js', '--outfile=node.js', target], {
'in.js': `
var obj = {}
obj[Symbol.toPrimitive] = hint => {
Expand All @@ -610,14 +612,18 @@
if (\`\${obj}c\` !== 'bc') throw 'fail'
if (\`a\${obj}c\` !== 'abc') throw 'fail'
`,
}),
test(['in.js', '--outfile=node.js', target], {
'in.js': `
var list = []
var trace = x => list.push(x)
var obj2 = { toString: () => trace(2) }
var obj4 = { toString: () => trace(4) }
var obj2 = { toString: () => trace(2) };
var obj4 = { toString: () => trace(4) };
\`\${trace(1), obj2}\${trace(3), obj4}\`
if (list.join('') !== '1234') throw 'fail'
`,
}),
test(['in.js', '--outfile=node.js', target], {
'in.js': `
x: {
try {
Expand Down

0 comments on commit 90f3449

Please sign in to comment.