Skip to content

Commit

Permalink
custom tests in Firefox on Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
maxyh committed Apr 3, 2018
1 parent 61f78b7 commit 4942a9c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ sudo: false # no need for virtualization.
addons:
chrome: stable
firefox: latest
# sauce_connect:
# username: "Your Sauce Labs username"
# access_key: "Your Sauce Labs access key"
language: node_js
node_js:
- "6.11"
Expand Down
19 changes: 14 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,26 @@ ws.on('message', function incoming(data) {
`npm run coveralls`
- `package.json`(NPM)
- prepublishOnly
`nps test clean build`
```bash
> nps test clean build
```
- coveralls
`npm run coverage && ./node_modules/coveralls/bin/coveralls.js < ./coverage/lcov.info`
```bash
> nps coveralls
# nps coverage && nyc report --reporter=text-lcov | coveralls
```
- coverage
```bash
istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec --exit
> istanbul coverage
```
- test
`nps test`
```bash
> nps test
```
- start
`nps`
```bash
> nps
```
- `package-scripts.js`(NPS)
- build
- lint
Expand Down
5 changes: 3 additions & 2 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ module.exports = config => {
const cfg = {
plugins: [
'karma-*',

// inlined plugins
{'framework:ws-server': ['factory', createWsServer]},
],
Expand Down Expand Up @@ -95,6 +95,7 @@ module.exports = config => {
//'Firefox',
//'Safari',
],
browserNoActivityTimeout: 30000,
logLevel: config.LOG_INFO,
client: {
mocha: {
Expand Down Expand Up @@ -170,7 +171,7 @@ module.exports = config => {
'ChromeHeadless_travis_ci',
'Chrome_travis_ci',
'FirefoxHeadless',
'Firefox'
//'Firefox'
];
console.error('No SauceLabs credentials present');
}
Expand Down
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@
"start": "nps",
"test": "nps test",
"coverage": "nps coverage",
"coveralls": "nps coveralls",
"test_node": "mocha --exit test/*spec.js",
"coverage_node": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec --exit",
"coveralls_node": "npm run-script coverage_node && ./node_modules/coveralls/bin/coveralls.js < ./coverage/lcov.info"
"coveralls": "nps coveralls"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 4942a9c

Please sign in to comment.