Making JS tests windows friendly (#123)

This commit is contained in:
Mike Arpaia 2016-09-06 17:00:34 -04:00 committed by GitHub
parent a90645a95f
commit 7a67e98eda
3 changed files with 36 additions and 25 deletions

View file

@ -1,32 +1,33 @@
var path = require('path');
module.exports = {
extends: "airbnb",
parser: "babel-eslint",
extends: 'airbnb',
parser: 'babel-eslint',
plugins: [
"react"
'react'
],
env: {
"node": true,
"mocha": true
'node': true,
'mocha': true
},
globals: {
"expect": false,
"describe": false
'expect': false,
'describe': false
},
rules: {
"consistent-return": 1,
"arrow-body-style": 0,
"max-len": 0,
"no-use-before-define": [2, "nofunc"],
"no-unused-expressions": 0,
"no-console": 0,
"space-before-function-paren": 0,
"react/prefer-stateless-function": 0,
"react/no-multi-comp": 0,
"no-param-reassign": 0,
"new-cap": 0,
'import/no-unresolved': 'error'
'consistent-return': 1,
'arrow-body-style': 0,
'max-len': 0,
'no-use-before-define': [2, 'nofunc'],
'no-unused-expressions': 0,
'no-console': 0,
'space-before-function-paren': 0,
'react/prefer-stateless-function': 0,
'react/no-multi-comp': 0,
'no-param-reassign': 0,
'new-cap': 0,
'import/no-unresolved': 'error',
'linebreak-style': 0
},
settings: {
'import/resolver': {

View file

@ -16,10 +16,21 @@ else
go build -o build/kolide
endif
test:
lint-js:
$(shell npm bin)/eslint . --ext .js,.jsx
lint-go:
go vet $(shell glide nv)
lint: lint-go lint-js
test-go:
go test -v -cover $(shell glide nv)
npm run test
test-js:
$(shell npm bin)/_mocha --compilers js:babel-core/register --recursive 'frontend/**/*.tests.js*' --require testSetup.js
test: lint test-go test-js
generate: .prefix
go-bindata -pkg=server -o=server/bindata.go frontend/templates/ build/
@ -30,7 +41,7 @@ generate-dev: .prefix
$(shell npm bin)/webpack --progress --colors --bail --watch
deps:
npm install
npm install --dev
go get -u github.com/Masterminds/glide
go get -u github.com/jteeuwen/go-bindata/...
glide install

View file

@ -5,9 +5,8 @@
"author": "Kolide, Inc.",
"private": "true",
"scripts": {
"lint": "eslint . --ext .js,.jsx",
"mocha": "node_modules/mocha/bin/_mocha --compilers js:babel-core/register --recursive 'frontend/**/*.tests.js*' --require testSetup.js",
"test": "npm run lint && npm run mocha"
"lint": "make lint-js",
"test": "make test-js"
},
"dependencies": {
"autoprefixer": "6.3.7",