Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to js-reporters 2 #249

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ language: node_js
node_js:
- 'stable'

before_install:
- npm install -g grunt-cli jshint gulp

script:
- npm run-script test-ci

Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# BrowserStack Runner

[![Build Status](https://travis-ci.org/browserstack/browserstack-runner.svg?branch=master)](https://travis-ci.org/browserstack/browserstack-runner)

A command line interface to run browser tests over BrowserStack.

## Hotfixes from [@qunitjs/browserstack-runner](https://github.com/qunitjs/browserstack-runner):

1. Fix Mocha 8+ compat. [#248](https://github.com/browserstack/browserstack-runner/issues/248)
2. Fix QUnit.todo breakage. [#247](https://github.com/browserstack/browserstack-runner/issues/247)

## Usage

Install globally:
Expand Down
26 changes: 18 additions & 8 deletions lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,17 +387,27 @@ exports.Server = function Server(bsClient, workers, config, callback) {

logger.trace('[%s] _progress', worker.id, CircularJSON.stringify(query));

if (query && query.test && query.test.errors) {
if (query && query.test) {
// Include all tests in the report
var browserReport = getBrowserReport(browserInfo);
browserReport.tests.push(query.test || {});

query.test.errors.forEach(function(error) {
logger.info('[%s] ' + chalk.red('Error:'), browserInfo, formatTraceback({
error: error,
testName: query.test.name,
suiteName: query.test.suiteName
}));
});
// Only print errors of failed tests
// (errors from todo tests are expected and will not be reported as
// "failed" to the "_report" handler either, so printing them here
// would create a confusing output with error printed but a success
// status at the end)
// https://github.com/browserstack/browserstack-runner/issues/247
if (query.test.errors && query.test.status !== 'todo') {
query.test.errors.forEach(function(error) {
logger.info('[%s] ' + chalk.red('Error:'), browserInfo, formatTraceback({
testName: query.test.name,
suiteName: query.test.suiteName,
status: query.test.status,
error: error
}));
});
}
}
response.end();
},
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "browserstack-runner",
"description": "A command line interface to run browser tests over BrowserStack",
"version": "0.9.5",
"name": "@qunitjs/browserstack-runner",
"description": "[Hotfix] run browser tests over BrowserStack",
"version": "0.9.5-qunitjs.1",
"homepage": "https://github.com/browserstack/browserstack-runner",
"repository": {
"type": "git",
Expand All @@ -11,7 +11,7 @@
"browserstack": "1.3.0",
"chalk": "0.4.0",
"circular-json": "0.3.1",
"js-reporters": "1.1.0",
"js-reporters": "2.1.0",
"mime": "1.6.0",
"resolve": "1.1.7",
"send": "0.16.2",
Expand Down