Files
babel/packages/babel-plugin-transform-template-literals/test/fixtures/default/order2/exec.js

20 lines
233 B
JavaScript

const calls = [];
`
${{
[Symbol.toPrimitive]() {
calls.push(1);
return "foo";
}
}}
${1 +
{
valueOf() {
calls.push(2);
return 2;
}
}}
`;
assert.deepEqual(calls, [1, 2]);