From bca901cd6b83fcd37fde3aeeabcfac204bdad2a0 Mon Sep 17 00:00:00 2001 From: Guy Carmeli Date: Thu, 14 Nov 2024 15:52:36 +0200 Subject: [PATCH] Test inject --- .../swc-plugin-obsidian/tests/fixtures/namedInject/input.ts | 5 +++++ .../swc-plugin-obsidian/tests/fixtures/namedInject/output.js | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 packages/swc-plugin-obsidian/tests/fixtures/namedInject/input.ts create mode 100644 packages/swc-plugin-obsidian/tests/fixtures/namedInject/output.js diff --git a/packages/swc-plugin-obsidian/tests/fixtures/namedInject/input.ts b/packages/swc-plugin-obsidian/tests/fixtures/namedInject/input.ts new file mode 100644 index 00000000..5c281e9a --- /dev/null +++ b/packages/swc-plugin-obsidian/tests/fixtures/namedInject/input.ts @@ -0,0 +1,5 @@ +import { Inject } from "react-obsidian"; + +export class Foo { + @Inject() public readonly bar!: string; +} diff --git a/packages/swc-plugin-obsidian/tests/fixtures/namedInject/output.js b/packages/swc-plugin-obsidian/tests/fixtures/namedInject/output.js new file mode 100644 index 00000000..94af579f --- /dev/null +++ b/packages/swc-plugin-obsidian/tests/fixtures/namedInject/output.js @@ -0,0 +1,5 @@ +import { Inject } from "react-obsidian"; +export class Foo { + @Inject("bar") + public readonly bar!: string; +}