From 9a4fa99575359aeab5748c191ae6b3dbe2d935b0 Mon Sep 17 00:00:00 2001 From: EqualMa Date: Sun, 18 Jul 2021 20:16:03 +0000 Subject: [PATCH] feat: example function hello --- src/index.spec.ts | 5 +++++ src/index.ts | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 src/index.spec.ts create mode 100644 src/index.ts diff --git a/src/index.spec.ts b/src/index.spec.ts new file mode 100644 index 0000000..ffde8a8 --- /dev/null +++ b/src/index.spec.ts @@ -0,0 +1,5 @@ +import hello from "."; + +test("hello world!", () => { + expect(hello("world")).toBe("hello world!"); +}); diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..160fd44 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,3 @@ +export default function hello(name: string): string { + return `hello ${name}!`; +}