Skip to content

Commit 68963ce

Browse files
Restore standalone mustache invocation test case with auto-fix output
Co-authored-by: NullVoxPopuli <[email protected]>
1 parent cf2a5cd commit 68963ce

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

tests/lib/rules/template-missing-invokable.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,27 @@ ruleTester.run('template-missing-invokable', rule, {
111111
},
112112

113113
// Mustache Invocations — always auto-fixes when invokable is configured
114+
{
115+
code: `
116+
<template>
117+
{{eq 1 1}}
118+
</template>
119+
`,
120+
output: `import { eq } from 'ember-truth-helpers';
121+
122+
<template>
123+
{{eq 1 1}}
124+
</template>
125+
`,
126+
options: [
127+
{
128+
invokables: {
129+
eq: ['eq', 'ember-truth-helpers'],
130+
},
131+
},
132+
],
133+
errors: [{ type: 'GlimmerPathExpression', message: rule.meta.messages['missing-invokable'] }],
134+
},
114135
{
115136
code: `
116137
import MyComponent from 'somewhere';

0 commit comments

Comments
 (0)