git ssb

1+

dinoworm ๐Ÿ› / catstack



Commit 72d3e314ca4f0200e1b54a89f6c5deec821c7638

change spec runner to test all files ending in `spec.js`

Michael Williams committed on 1/9/2016, 4:15:43 AM
Parent: d86f4a4c7da0876328cdc298a672bf5715b288b9

Files changed

.gitignorechanged
app/spec.jsdeleted
package.jsonchanged
.gitignoreView
@@ -1,4 +1,4 @@
1-/node_modules
1+node_modules
22 npm-debug.log*
33
44 /build
app/spec.jsView
@@ -1,10 +1,0 @@
1-const ava = require('ava/api')
2-const glob = require('glob')
3-
4-glob('{spec/*.js,*/spec.js,*/spec/*.js}', { cwd: __dirname }, function (err, files) {
5- if (err) { throw err }
6-
7- if (files.length > 0) {
8- ava(files).run()
9- }
10-})
package.jsonView
@@ -7,9 +7,9 @@
77 "postinstall": "lnfs app node_modules/app",
88 "lint": "snazzy",
99 "format": "snazzy --format",
1010 "test": "npm-run-all -p test:*",
11- "test:spec": "node app/spec",
11+ "test:spec": "ava",
1212 "test:feature": "node app/features",
1313 "pg:pull": "docker pull postgres",
1414 "pg:run": "docker run -d -p 5432:5432 --name=business-postgres postgres",
1515 "pg:start": "docker start business-postgres",
@@ -29,8 +29,13 @@
2929 "prod:static": "node static",
3030 "dev": "NODE_ENV=development npm-run-all -p dev:*",
3131 "prod": "NODE_ENV=production npm-run-all -p prod:*"
3232 },
33+ "ava": {
34+ "files": [
35+ "**/*.spec.js"
36+ ]
37+ },
3338 "repository": {
3439 "type": "git",
3540 "url": "git+https://github.com/enspiral-craftworks/business-stack.git"
3641 },
@@ -57,16 +62,16 @@
5762 "node": "^4.0.0",
5863 "npm": "^3.0.0"
5964 },
6065 "devDependencies": {
61- "ava": "^0.8.0",
66+ "ava": "github:sindresorhus/ava#16c7282e97c9ab671bc1d56920fd3fb125a65eab",
6267 "babel-plugin-react-transform": "^2.0.0",
6368 "browserify-hmr": "^0.3.1",
6469 "cuke-tap": "^1.0.2",
6570 "ecstatic-lr": "^1.0.1",
6671 "feathers-memory": "^0.5.1",
6772 "garnish": "^5.0.1",
68- "glob": "^6.0.2",
73+ "multi-glob": "^1.0.1",
6974 "jsdom": "^7.1.0",
7075 "node-dev": "^2.7.1",
7176 "react-transform-catch-errors": "^1.0.0",
7277 "react-transform-hmr": "^1.0.1",

Built with git-ssb-web