Justin Ridgewell 29eafbbf44
Remove tagged template literal global caching (#7722)
* Remove tagged template literal global caching

Fixes #7350.

* Review comments

* assert output
2018-04-13 11:51:00 -04:00

21 lines
636 B
JavaScript

var _templateObject = /*#__PURE__*/ _taggedTemplateLiteral(["some template"]),
_templateObject2 = /*#__PURE__*/ _taggedTemplateLiteral(["some template"]);
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
var tag = v => v;
function foo() {
return tag(_templateObject);
}
function bar() {
return tag(_templateObject2);
}
expect(foo()).toBe(foo());
expect(foo()).toEqual(["some template"]);
expect(bar()).toBe(bar());
expect(bar()).toEqual(["some template"]);
expect(bar()).not.toBe(foo());