diff --git a/tests/helpers.ts b/tests/helpers.ts
index 2fef61a..8bf1fc9 100644
--- a/tests/helpers.ts
+++ b/tests/helpers.ts
@@ -25,6 +25,24 @@ export const unicodeSingle = [
"",
].join("\n");
+export const withService = [
+ "import { service } from '@ember/service';",
+ "import Component from '@glimmer/component';",
+ "",
+ "export class ExampleComponent extends Component {",
+ " @service('store') store;",
+ " property = true;",
+ "",
+ " ask() {",
+ " return 'hello world'",
+ " }",
+ "",
+ " ",
+ " My Component
",
+ " ",
+ "}",
+].join("\n");
+
export const unicodeMulti = [
"export const Run = ",
" r̸̳͙̟̳̺̩̎̍̎̚͠ǘ̷̟̀͂̽̿̅̆̈́n̷̜̣̙̫̦̳͇̞̣̻͑̊̂́̿̈́̕͜͜͠ͅ",
diff --git a/tests/transformer.toStringWithTemplatePlaceholders.test.ts b/tests/transformer.toStringWithTemplatePlaceholders.test.ts
index 626eff8..432ba1a 100644
--- a/tests/transformer.toStringWithTemplatePlaceholders.test.ts
+++ b/tests/transformer.toStringWithTemplatePlaceholders.test.ts
@@ -3,6 +3,7 @@ import { describe, it, expect } from "vitest";
import { Transformer } from "content-tag-utils";
import {
+ withService,
implicitDefault,
inAClass,
multiTemplate,
@@ -111,6 +112,31 @@ it("multiWithClass", () => {
expect(multiWithClass.length).toEqual(result.length);
});
+it("withService", () => {
+ let t = new Transformer(withService);
+
+ let result = t.toString({ placeholders: true });
+
+ expect(result).toMatchInlineSnapshot(`
+ "import { service } from '@ember/service';
+ import Component from '@glimmer/component';
+
+ export class ExampleComponent extends Component {
+ @service('store') store;
+ property = true;
+
+ ask() {
+ return 'hello world'
+ }
+
+ [_TEMPLATE_(\`
+ My Component
+ \`)] = 0;
+ }"
+ `);
+ expect(withService.length).toEqual(result.length);
+});
+
describe("with transforms", () => {
it("noop", () => {
let t = new Transformer(simpleTest);