From c4d49d5fc4078fb41507123ff74fc3f58cf06dde Mon Sep 17 00:00:00 2001 From: Colin Caine Date: Sun, 2 Sep 2018 12:31:20 +0100 Subject: [PATCH] Minimal test infrastructure --- package.json | 8 ++++++-- src/client.ts | 2 ++ test/client.spec.ts | 8 ++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 src/client.ts create mode 100644 test/client.spec.ts diff --git a/package.json b/package.json index 8b86ea59..cee05dc5 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", + "test": "mocha -r ts-node/register test/**/*.ts", "pretty": "scripts/pretty", "build": "parcel build --no-minify src/manifest.json --no-cache", "qbuild": "parcel build --no-minify src/manifest.json", @@ -32,7 +32,11 @@ "web-ext-types": "github:kelseasy/web-ext-types" }, "dependencies": { - "csp-serdes": "git+https://github.com/cmcaine/csp-serdes.git" + "csp-serdes": "git+https://github.com/cmcaine/csp-serdes.git", + "@types/mocha": "^5.2.5", + "chai": "^4.1.2", + "mocha": "^5.2.0", + "ts-node": "^7.0.0" }, "browserslist": [ "Firefox >= 54" diff --git a/src/client.ts b/src/client.ts new file mode 100644 index 00000000..224b4697 --- /dev/null +++ b/src/client.ts @@ -0,0 +1,2 @@ +export default class Client { +} diff --git a/test/client.spec.ts b/test/client.spec.ts new file mode 100644 index 00000000..c5454b31 --- /dev/null +++ b/test/client.spec.ts @@ -0,0 +1,8 @@ +import client from '../src/client' + +import { expect, assert } from 'chai' +import 'mocha' + +describe('client', function() { + it('should have an onkey method') +})