Skip to content
Permalink
Browse files
fix tests
  • Loading branch information
Qix- committed Sep 11, 2018
1 parent 62822f1 commit 57cde56e43003f6b404d4b3d9d76b74aafaeeec8
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 9 deletions.
@@ -0,0 +1,13 @@
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"chrome": "58",
"ie": "8"
}
}
]
]
}
@@ -8,11 +8,10 @@ node_js:
- "10"

install:
- make install
- npm install

script:
- make lint
- make test
- make all

matrix:
include:
@@ -17,17 +17,25 @@ BROWSERIFY ?= $(NODE) $(BIN)/browserify

all: lint test

browser: dist/debug.js
browser: dist/debug.js dist/test.js

dist/debug.js: src/*.js
@mkdir -p dist
@$(BROWSERIFY) --standalone debug . > dist/debug.js
@$(BROWSERIFY) --standalone debug . > $@.es6.js
@babel $@.es6.js > $@
@rm $@.es6.js

dist/test.js: test.js
@mkdir -p dist
@cp $< $@.es6.js
@babel $@.es6.js > $@
@rm $@.es6.js

lint:
@xo

test-node:
@istanbul cover node_modules/mocha/bin/_mocha -- test/**.js
@istanbul cover node_modules/mocha/bin/_mocha -- test.js
@cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js

test-browser:
@@ -9,12 +9,12 @@ module.exports = function (config) {

// Frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['mocha', 'chai', 'sinon'],
frameworks: ['mocha', 'chai'],

// List of files / patterns to load in the browser
files: [
'dist/debug.js',
'test/*spec.js'
'dist/test.js'
],

// List of files to exclude
@@ -21,6 +21,9 @@
"ms": "^2.1.1"
},
"devDependencies": {
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"browserify": "14.4.0",
"chai": "^3.5.0",
"concurrently": "^3.1.0",
@@ -10,7 +10,7 @@ let debug;
if (typeof module !== 'undefined') {
chai = require('chai');
expect = chai.expect;
debug = require('../src');
debug = require('./src');
}

describe('debug', () => {

0 comments on commit 57cde56

Please sign in to comment.