Skip to content

Commit 78369fb

Browse files
committed
Wire the browser test to execute the tests against the build library.
This should act as a cheap smoke test that the build was functional.
1 parent 7a56448 commit 78369fb

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Diff for: .travis.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@ matrix:
2020
node_js: '8.10.0'
2121
env:
2222
- TARGET=coverage
23-
- name: Chrome headless
23+
- name: Pseudo Browser
2424
node_js: '8.10.0'
2525
env:
2626
- TARGET=test-browser
27-
- BROWSER=ChromeHeadless
2827

2928
script: "npm run $TARGET"
3029
after_success: '<coverage/lcov.info ./node_modules/coveralls/bin/coveralls.js'

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"coverage": "nyc --reporter=lcov --reporter=text npm test",
1515
"lint": "eslint .",
1616
"test": "npm run lint && npm run test-node && npm run test-browser",
17-
"test-browser": "npm run prepublish && true",
17+
"test-browser": "npm run prepublish && PSEUDO_BROWSER=yes mocha",
1818
"test-node": "mocha",
1919
"prepublish": "rollup -c"
2020
},

Diff for: test/magicpen.spec.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*global describe, it, beforeEach*/
2-
var magicpen = require('..');
2+
var magicpen = process.env.PSEUDO_BROWSER ? require('..') : require('../lib/MagicPen');
3+
34
var expect = require('unexpected');
45
var sinon = require('sinon');
56
expect.use(require('unexpected-sinon'));

0 commit comments

Comments
 (0)