From e12ac20ddbb2ea0e9b2b33947952783eb89833fa Mon Sep 17 00:00:00 2001 From: James Richford Date: Tue, 3 Jan 2017 07:56:06 +0000 Subject: [PATCH] add test command --- package.json | 3 ++- test/unit-tests/example.spec.ts | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 test/unit-tests/example.spec.ts diff --git a/package.json b/package.json index 466f96d..d472e64 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "main": "src/karma-alsatian.js", "scripts": { "build": "tsc", - "test": "echo \"Error: no test specified\" && exit 1" + "pretest": "npm run build", + "test": "alsatian \"./test/**/*.spec.js\"" }, "repository": { "type": "git", diff --git a/test/unit-tests/example.spec.ts b/test/unit-tests/example.spec.ts new file mode 100644 index 0000000..67c2b37 --- /dev/null +++ b/test/unit-tests/example.spec.ts @@ -0,0 +1,10 @@ +import { TestFixture, Test, Expect } from "alsatian"; + +@TestFixture("example") +export default class ExampleTestFixture { + + @Test("example test") + public exampleTest() { + Expect(2 + 2).toBe(4); + } +} \ No newline at end of file