diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-assertion.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-assertion.test.ts index db8309164efb..d792a6494dc3 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-assertion.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-assertion.test.ts @@ -294,13 +294,17 @@ function bar(items: string[]) { }, // https://github.com/typescript-eslint/typescript-eslint/issues/8737 ` -let myString = 'foo'; +declare const myString: 'foo'; const templateLiteral = \`\${myString}-somethingElse\` as const; `, // https://github.com/typescript-eslint/typescript-eslint/issues/8737 ` -let myString = 'foo'; +declare const myString: 'foo'; const templateLiteral = \`\${myString}-somethingElse\`; + `, + ` +const myString = 'foo'; +const templateLiteral = \`\${myString}-somethingElse\` as const; `, 'let a = `a` as const;', {