From 5f40053f1cb642997ecd1e622376dbf652be3864 Mon Sep 17 00:00:00 2001 From: Ketut Sandiarsa Date: Sat, 18 Apr 2020 16:46:18 +0800 Subject: [PATCH] tests: Add test on exported members (#39) --- test/__snapshots__/index.spec.js.snap | 24 ++++++++++++++++++++++++ test/index.spec.ts | 7 +++++++ 2 files changed, 31 insertions(+) create mode 100644 test/__snapshots__/index.spec.js.snap create mode 100644 test/index.spec.ts diff --git a/test/__snapshots__/index.spec.js.snap b/test/__snapshots__/index.spec.js.snap new file mode 100644 index 0000000..4046638 --- /dev/null +++ b/test/__snapshots__/index.spec.js.snap @@ -0,0 +1,24 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Exported Should export members 1`] = ` +Array [ + "DecoratorOption", + "DecoratorId", + "DECORATOR_KEY", + "DESIGN_TYPE", + "DESIGN_PARAMETER_TYPE", + "DESIGN_RETURN_TYPE", + "decorateParameter", + "decorateMethod", + "decorateProperty", + "decorateClass", + "decorate", + "mergeDecorator", + "isConstructor", + "isCustomClass", + "addDecorator", + "useCache", + "reflect", + "default", +] +`; diff --git a/test/index.spec.ts b/test/index.spec.ts new file mode 100644 index 0000000..4585cc9 --- /dev/null +++ b/test/index.spec.ts @@ -0,0 +1,7 @@ +import * as src from "../src" + +describe("Exported", () => { + it("Should export members", () => { + expect(Object.keys(src)).toMatchSnapshot() + }) +}) \ No newline at end of file