Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Commit ac2ef3d

Browse files
committed
BUGFIX - Prevent duplicate compiled modules in test
1 parent cd4b923 commit ac2ef3d

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

packages/@glimmer/core/src/template.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,17 @@ const TEMPLATE_MAP = new WeakMap<object, SerializedTemplateWithLazyBlock<Templat
66
const getPrototypeOf = Object.getPrototypeOf;
77

88
// This is provided by the `babel-plugin-strict-template-precompile` plugin
9-
export let createTemplate: ((
9+
export let createTemplate: (
1010
scopeOrTemplate: Dict<unknown> | string,
1111
template?: string
12-
) => SerializedTemplateWithLazyBlock<TemplateMeta>);
12+
) => SerializedTemplateWithLazyBlock<TemplateMeta>;
1313

1414
if (DEBUG) {
1515
createTemplate = (): SerializedTemplateWithLazyBlock<TemplateMeta> => {
16-
throw new Error('createTemplate() is meant to be preprocessed with a babel plugin, @glimmer/babel-plugin-strict-template-precompile. If you are seeing this error message, it means that you do not have this babel plugin installed, or it is not enabled correctly');
17-
}
16+
throw new Error(
17+
'createTemplate() is meant to be preprocessed with a babel plugin, @glimmer/babel-plugin-strict-template-precompile. If you are seeing this error message, it means that you do not have this babel plugin installed, or it is not enabled correctly'
18+
);
19+
};
1820
}
1921

2022
export function setComponentTemplate<T extends object>(

packages/@glimmer/core/test/non-interactive/component-template-test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
const { module, test } = QUnit;
22

3-
import { setComponentTemplate } from '../..';
4-
import { getComponentTemplate } from '../../src/template';
3+
import { getComponentTemplate, setComponentTemplate } from '../../src/template';
54

65
module('component templates', () => {
76
test('setting and getting', assert => {

packages/@glimmer/core/test/non-interactive/manager-test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
const { module, test } = QUnit;
22

3-
import { setComponentManager } from '../..';
4-
import { getComponentManager } from '../../src/managers';
3+
import { getComponentManager, setComponentManager } from '../../src/managers';
54

65
module('component managers', () => {
76
test('setting and getting', assert => {

0 commit comments

Comments
 (0)