Noah Lemen 40805894c5 default to spec mode for template literal transform (#6098)
* spec/loose/default switch for template literal transform, update/re-org tests

* update readme

* flip if statements

* consolidate else/if

* readme wording modification, updates to examples
2017-08-28 12:57:09 -06:00

25 lines
310 B
JavaScript

const calls = [];
`
${
calls.push(1),
{
[Symbol.toPrimitive](){
calls.push(2);
return 'foo';
}
}
}
${
calls.push(3),
{
[Symbol.toPrimitive](){
calls.push(4);
return 'bar';
}
}
}
`;
assert.deepEqual(calls, [1, 2, 3, 4]);