Minimal test infrastructure

This commit is contained in:
Colin Caine 2018-09-02 12:31:20 +01:00
parent d0dea24c90
commit c4d49d5fc4
3 changed files with 16 additions and 2 deletions

View file

@ -4,7 +4,7 @@
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "test": "mocha -r ts-node/register test/**/*.ts",
"pretty": "scripts/pretty", "pretty": "scripts/pretty",
"build": "parcel build --no-minify src/manifest.json --no-cache", "build": "parcel build --no-minify src/manifest.json --no-cache",
"qbuild": "parcel build --no-minify src/manifest.json", "qbuild": "parcel build --no-minify src/manifest.json",
@ -32,7 +32,11 @@
"web-ext-types": "github:kelseasy/web-ext-types" "web-ext-types": "github:kelseasy/web-ext-types"
}, },
"dependencies": { "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": [ "browserslist": [
"Firefox >= 54" "Firefox >= 54"

2
src/client.ts Normal file
View file

@ -0,0 +1,2 @@
export default class Client {
}

8
test/client.spec.ts Normal file
View file

@ -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')
})