Lay the ground for having unit tests.

This commit is contained in:
Nils Norman Haukås 2017-05-01 21:47:10 +02:00
parent b81fdf10d5
commit a7ff3c6052
5 changed files with 15 additions and 3 deletions

3
.gitignore vendored
View file

@ -1,7 +1,6 @@
node_modules
jspm_packages
typings
dist
tmp
tmp-js-build
*.zip
.idea/

View file

@ -15,6 +15,8 @@ Prerequisites:
1. Run `npm install`
1. Run `npm start` to serve up the prototype for live development. To configure what browser is started please see the `npm start` command found in the package.json file.
`npm test` will run the unit tests.
Please note: A [workaround for CORS](https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi?utm_source=chrome-app-launcher-info-dialog) is needed for allowing the live development version to talk to the server.
## Deployment

View file

@ -6,6 +6,7 @@
"scripts": {
"clean": "rm -r dist node_modules || true",
"build": "webpack && ./build.sh",
"test": "tsc && ava",
"start": "browser-sync start --no-notify -b chromium --startPath test/ --server --files 'src/**/*'",
"package": "rm dist.zip || true && zip -r dist.zip dist",
"webpack": "webpack"
@ -35,6 +36,7 @@
"@types/rangy": "0.0.27",
"@types/uuid": "^2.0.29",
"angular": "1.5.8",
"ava": "^0.19.1",
"browser-sync": "^2.18.8",
"jquery": "^2.2.4",
"lodash": "4.12.0",

View file

@ -0,0 +1,7 @@
import test from 'ava'
import { WebPageService } from './webpage.service'
test('readd tags to page', t => {
t.pass()
})

View file

@ -1,6 +1,8 @@
{
"compilerOptions": {
"target": "es5",
"noImplicitAny": false
"noImplicitAny": false,
"module": "commonjs",
"outDir": "tmp-js-build/"
}
}