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

Upgrade to pick up YOU54F changes from cypress-multi-reporter #72

Merged
merged 119 commits into from
Oct 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
df03b72
mocha 6 fix
YOU54F Mar 27, 2019
090fd63
fix: make compatible with mocha 6+ and earlier versions
YOU54F May 5, 2019
31a9db7
Merge branch 'master' into mocha6fix
YOU54F May 5, 2019
ab974f9
Merge pull request #1 from YOU54F/mocha6fix
YOU54F May 5, 2019
b34450e
release: 1.1.8 - mocha 6 fix
YOU54F May 5, 2019
e128caf
release: 1.1.9 - mocha 3 peer dep
YOU54F May 5, 2019
b8db10c
fix: make compatible with mocha 6+ and earlier versions
YOU54F May 6, 2019
391675c
fix: mocha 5 dont instantiate stat collector
YOU54F May 6, 2019
8fd4e38
fix: mocha 3 peer dep
YOU54F May 6, 2019
bbbbaa8
chore: make npm package smaller
YOU54F May 6, 2019
c1e4ecf
Update README.md
YOU54F May 31, 2019
ebf094e
Update README.md
YOU54F May 31, 2019
8f8791c
Update .travis.yml
YOU54F May 31, 2019
604cce5
merge master
YOU54F May 31, 2019
b036e71
Merge branch 'mocha6fix'
YOU54F May 31, 2019
3409ca4
Merge pull request #4 from YOU54F/mocha6fix
YOU54F May 31, 2019
3b0aae0
bump deps
YOU54F May 31, 2019
a12277d
Update .travis.yml
YOU54F May 31, 2019
e4c12f9
Update README.md
YOU54F May 31, 2019
4a89816
Update README.md
YOU54F May 31, 2019
5556493
Merge pull request #5 from YOU54F/updateDeps
YOU54F May 31, 2019
66f0a2e
Add renovate.json
renovate-bot Jun 2, 2019
fc98a9a
Merge pull request #1 from YOU54F/renovate/configure
YOU54F Jun 3, 2019
c5d9a0c
Pin dependencies
renovate-bot Jun 3, 2019
ecd58ea
Merge pull request #2 from YOU54F/renovate/pin-dependencies
YOU54F Jun 3, 2019
a970f9d
Update dependency chai to v4
renovate-bot Jun 3, 2019
4c15615
Merge pull request #3 from YOU54F/renovate/chai-4.x
YOU54F Jun 3, 2019
ce508ef
Automated release (#4)
YOU54F Jun 3, 2019
4df5c1d
docs: update coverage link
YOU54F Jun 3, 2019
2d0473f
chore(deps): update dependency husky to v2.4.0 (#5)
renovate[bot] Jun 5, 2019
a599a7c
chore(deps): update dependency coveralls to v3.0.4 (#6)
renovate[bot] Jun 6, 2019
f7bb95a
Check reporter (#7)
YOU54F Jun 7, 2019
9d99882
chore(release): 1.1.22
YOU54F Jun 7, 2019
96b559e
Update CHANGELOG.md
YOU54F Jun 7, 2019
f4e23f5
chore(deps): update dependency husky to v2.4.1 (#8)
renovate[bot] Jun 13, 2019
8f54390
chore(deps): update dependency jenkins-mocha to v8 (#12)
renovate[bot] Jul 8, 2019
2af5e9c
chore(deps): update dependency husky to v3 (#13)
renovate[bot] Jul 8, 2019
6bb80fb
chore(release): 1.1.23
YOU54F Jul 8, 2019
5f633ec
feat(options): add options in rc file (#14)
kenhuman Jul 8, 2019
7d77e59
chore(release): 1.2.0
YOU54F Jul 8, 2019
b1d5be5
chore(deps): update commitlint monorepo to v8.1.0 (#16)
renovate[bot] Aug 7, 2019
d4fd2bf
chore(deps): update dependency husky to v3.0.2 (#17)
renovate[bot] Aug 7, 2019
db93284
chore(deps): update dependency coveralls to v3.0.6 (#15)
renovate[bot] Aug 7, 2019
c076bf3
chore(deps): update dependency standard-version to v7 (#18)
renovate[bot] Aug 7, 2019
fe3bc60
Ensure Mocha always gets found (#20)
KittyGiraudel Aug 7, 2019
1faeb83
chore(deps): update dependency sinon to v7.4.1 (#21)
renovate[bot] Aug 7, 2019
4dbcbf1
Revert "feat(options): add options in rc file (#14)" (#22)
YOU54F Aug 7, 2019
a890a05
chore(release): 1.2.1
YOU54F Aug 7, 2019
341c687
chore(deps): update dependency husky to v3.0.3 (#23)
renovate[bot] Aug 13, 2019
ce7b73d
chore(deps): update dependency husky to v3.0.4 (#24)
renovate[bot] Aug 21, 2019
cacad9c
Update renovate.json
YOU54F Sep 4, 2019
9957ee5
chore(deps): update dependency sinon to v7.4.2 (#26)
renovate[bot] Sep 4, 2019
11f364e
chore(deps): update dependency husky to v3.0.5
renovate-bot Sep 1, 2019
832657b
chore(deps): update commitlint monorepo to v8.2.0
renovate-bot Sep 16, 2019
d7092c9
chore(deps): update dependency sinon to v7.5.0
renovate-bot Sep 23, 2019
67c4c4d
chore(deps): update dependency husky to v3.0.7
renovate-bot Sep 28, 2019
0780a28
chore(deps): update dependency husky to v3.0.8
renovate-bot Oct 2, 2019
1c9b13d
chore(deps): update dependency coveralls to v3.0.7
renovate-bot Oct 10, 2019
baae24b
chore(deps): update dependency husky to v3.0.9
renovate-bot Oct 13, 2019
fb87e16
chore(release): 1.2.2
YOU54F Oct 17, 2019
7a8fe9e
chore(release): 1.2.3
YOU54F Oct 17, 2019
626debb
chore(deps): update dependency husky to v3.1.0
renovate-bot Nov 18, 2019
ace0e06
chore(deps): update dependency standard-version to v7.0.1
renovate-bot Nov 18, 2019
ff31187
chore(deps): update dependency coveralls to v3.0.8
renovate-bot Nov 21, 2019
e75ec75
chore(deps): update dependency coveralls to v3.0.9
renovate-bot Nov 26, 2019
d239fc9
chore(deps): update commitlint monorepo to v8.3.3
renovate-bot Jan 3, 2020
c817fa2
chore(deps): update commitlint monorepo to v8.3.4
renovate-bot Jan 3, 2020
e81fa17
chore(deps): update dependency @commitlint/cli to v8.3.5
renovate-bot Jan 15, 2020
19120d5
chore(deps): update dependency standard-version to v7.1.0
renovate-bot Jan 21, 2020
252c1e8
chore(deps): update dependency husky to v4 (#42)
renovate[bot] Jan 31, 2020
5527d6f
chore(deps): update dependency sinon to v8 (#39)
renovate[bot] Jan 31, 2020
6f56d8b
chore(deps): update dependency husky to v4.2.2
renovate-bot Feb 12, 2020
8171d20
chore(release): 1.2.4
YOU54F Feb 12, 2020
691e510
chore(deps): update dependency husky to v4.2.3 (#47)
renovate[bot] Feb 12, 2020
8c66d2b
chore(deps): update dependency sinon to v9 (#48)
renovate[bot] Mar 8, 2020
8793ec5
chore(deps): update dependency sinon to v9.0.1
renovate-bot Mar 10, 2020
b58c0c8
chore(deps): update dependency coveralls to v3.0.11
renovate-bot Mar 19, 2020
f411cb2
chore(deps): update dependency sinon to v9.0.2
renovate-bot Apr 8, 2020
89f5250
chore(deps): update dependency husky to v4.2.4
renovate-bot Apr 9, 2020
f4830d3
chore(deps): update dependency husky to v4.2.5
renovate-bot Apr 9, 2020
c6170f2
chore(deps): update dependency coveralls to v3.0.12
renovate-bot Apr 21, 2020
dc72562
chore(deps): update dependency coveralls to v3.0.13
renovate-bot Apr 21, 2020
02f6c79
chore(deps): update dependency coveralls to v3.0.14
renovate-bot Apr 23, 2020
36b09fd
chore(deps): update dependency coveralls to v3.1.0
renovate-bot Apr 24, 2020
9eaa2fc
chore(deps): update dependency standard-version to v8 (#59)
renovate[bot] May 7, 2020
eb6a5a2
Npm/Linting/Updates (#62)
brettz9 May 9, 2020
184db91
chore(deps): pin dependencies (#66)
renovate[bot] May 9, 2020
e754c50
Eslint (#63)
brettz9 May 11, 2020
007fab8
Cmr output (#65)
brettz9 May 11, 2020
9a100da
chore(release): 1.3.0
YOU54F May 11, 2020
07abed1
chore(deps): update dependency eslint to v7 (#64)
renovate[bot] May 11, 2020
90a3338
Array options (#67)
brettz9 May 12, 2020
40b0868
chore(release): 1.4.0
YOU54F May 12, 2020
e91944b
chore(deps): update dependency eslint to v7.1.0
renovate-bot May 23, 2020
7c90257
chore(deps): update dependency mocha to v7.2.0
renovate-bot May 23, 2020
26b5959
chore(deps): update dependency nyc to v15.1.0
renovate-bot Jun 1, 2020
b2d58d7
chore(deps): update dependency eslint to v7.2.0
renovate-bot Jun 6, 2020
4fcbc7f
chore(deps): update dependency eslint to v7.3.1
renovate-bot Jun 23, 2020
c6bfff5
chore(deps): update dependency eslint to v7.4.0
renovate-bot Jul 3, 2020
b073bc0
docs: update reporters config in README (#77) (#79)
alvaromartmart Jul 8, 2020
0d4baf5
chore(deps): update dependency standard-version to v8.0.1
renovate-bot Jul 12, 2020
9182f57
chore(deps): update dependency standard-version to v8.0.2
renovate-bot Jul 14, 2020
0b5c607
chore(deps): update dependency eslint to v7.5.0
renovate-bot Jul 18, 2020
4125b97
chore(deps): update dependency eslint to v7.6.0
renovate-bot Jul 31, 2020
2514ce0
chore(deps): update dependency sinon to v9.0.3
renovate-bot Aug 11, 2020
a0d0bb5
chore(deps): update dependency eslint to v7.7.0
renovate-bot Aug 14, 2020
9264e11
chore(deps): update dependency eslint to v7.8.0
renovate-bot Aug 31, 2020
c1cfccd
chore(deps): update dependency eslint to v7.8.1
renovate-bot Sep 1, 2020
109eac4
chore(deps): update dependency husky to v4.3.0
renovate-bot Sep 7, 2020
221964c
chore(deps): update dependency eslint to v7.9.0
renovate-bot Sep 12, 2020
b871c62
chore(deps): update dependency eslint to v7.10.0
renovate-bot Sep 26, 2020
c2a168c
chore(deps): update dependency sinon to v9.1.0
renovate-bot Sep 29, 2020
9b96b73
chore(deps): update dependency sinon to v9.2.0
renovate-bot Oct 6, 2020
8806041
chore(deps): update dependency eslint to v7.11.0
renovate-bot Oct 9, 2020
06f0def
Merge remote-tracking branch 'you54j/master' into upgrade
francisu Oct 20, 2020
37be32b
chore: adoption of YOU54F changes
francisu Oct 20, 2020
cbcd65e
chore: adoption of YOU54F changes
francisu Oct 20, 2020
017f6e4
chore: adoption of YOU54F changes
francisu Oct 20, 2020
eefda37
Merge remote-tracking branch 'origin/master' into upgrade
francisu Oct 20, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 22 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
; EditorConfig file: https://EditorConfig.org
; Install the "EditorConfig" plugin into your editor to use

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.json]
indent_size = 2

[*.yml]
indent_size = 2


[*.md]
indent_size = 4
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ coverage/
node_modules/
lcov-*
xunit*
!.eslintrc.js
!.eslintrc.js
37 changes: 37 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
'use strict';

module.exports = {
extends: 'eslint:recommended',
env: {
node: true
},
parserOptions: {
ecmaVersion: 2015
},
rules: {
'brace-style': [2, 'stroustrup', {allowSingleLine: true}],
'no-console': 0,
strict: [2],
indent: [2, 4],

semi: ['error'],
'prefer-const': ['error'],
'no-var': ['error'],
'prefer-destructuring': ['error'],
'object-shorthand': ['error'],
quotes: ['error', 'single'],
'quote-props': ['error', 'as-needed'],
'prefer-template': ['error']
},
overrides: [
{
files: 'tests/**',
env: {
mocha: true
},
globals: {
expect: true
}
}
]
};
9 changes: 0 additions & 9 deletions .eslintrc.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ node_modules

.idea
.nyc_output


yarn.lock
package-lock.json
8 changes: 8 additions & 0 deletions .ncurc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
'use strict';

module.exports = {
// Whitelist all for checking besides `peer` which indicates
// somewhat older versions of `eslint` we still support even
// while our devDeps point to a more recent version
"dep": "prod,dev,optional,bundle"
};
32 changes: 32 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
node_modules
scripts

.github
artifacts
tests
.coveralls.yml
.eslint*
.gitignore
.travis.yml
yarn.lock
xunit.xml
commitlint.config.js
.nyc_output/
coverage
mocha-multi-reporters.tar.gz
node_modules
scripts

.github
artifacts
tests
.coveralls.yml
.eslint*
.gitignore
.travis.yml
yarn.lock
xunit.xml
commitlint.config.js
.nyc_output/
coverage
mocha-multi-reporters.tar.gz
53 changes: 38 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,41 @@
after_success:
- cat artifacts/coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
language: node_js
node_js:
- 'iojs'
- 'node'
- 'lts/*'
- '8'
- '7'
- '6'
- '5'
- '4'
sudo: false
- node
- lts/*
- 14
- 12
- 10
os:
- linux
matrix:
fast_finish: true
cache: yarn
env:
global:
- secure: GafZaP9uxJGukTI9UiKlMG5KbrJsin3xn3cRLXVjLLG4ctdPkXY+1w6RPJcRUm0ogCJS95p4HosltayyOQkb1Icve2nuaP4dqi79HKu+OgXqJ2VdNNT1XhK++QThmPrjq11sWank2m7LkbYm+rMj7PzxKUePAmloQUZLypSOQJk7jkQ5KAf0+nQv6K6Oj3xWJyDPFQkokQPc7EreaEV0iKi6RKoOhCed+Ju8KpbzBkj6ksRGwOaEVIkxFn7vNpQPO3X7JXQ/ZNQIB7Pbvolqi6JPuS3s/nnsFTA1Qiv4oQSV90yswH8ZlEZMN2hk8q/S7HzTMPXpZ/GGRNzBThbU+AUyCCiwQ8WzMwS5G0Ks+ICvhYdBc/stVvBpmYq7tQkib2Nj59hjG06AD9D+ZjU3QsmulBQ8jlZaD0zA334y+isQ35LLl6wkfIIzVQIU/dWj8V8x1clKjmhywDPMrTCgimQ9GT+Lk9BHAH0PbmOFQQc+h3ANfrZrypxHX8hhZxC7WxOto4ZGsFcf9nSikVSz9hgVxPlA3+Mkg220zBZEUe/MiBx9Q4ZdL465/NsTmqw6eRkcu28W0BAEVFh3+2GHDAHj4onW2f9PjX/Bdh3s6kXy8NzEFbbPr9wt5HK70x6U9H2rUbPpA2PIyp5UitnihGXXKC4ES1js/IHW0TjV9O4=
install: yarn install --ignore-engines
script: ./scripts/build.sh
after_success:
- cat artifacts/coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
before_deploy:
- npm prune --production
- tar -czvf mocha-multi-reporters.tar.gz package.json index.js lib/* config.json LICENSE README.md CHANGELOG.md
- npm run deploy:prepare
deploy:
provider: npm
email: stanleyhlng77-dev@yahoo.com.hk
api_key:
secure: os3PhiyAVCtZw0rrFIl06LZVVCaifosZrMnjJxRcnjEjdqpybsQUdjWxj3JMIIC0sjrQmk4NvMCbgw23zP4BemsGcPelzeFH/fx6nu9nSBYNx9Bq2cNBP4+wvFgdTLyphzk5z24UZ3MlJWpb7xXR6mn76k5knvH5WS67hdZ8EWMaQOPWiQq57sSI/hautBeQpwdU0+vzXdf6gWDK7bCuGAYMvjLRa6JIU242GuzS1vPrdjatfXEJmot6PtBLt042T2v56ijw1eAHc3Z9AxN0t8FySZd7up/YsQcQvOXrWShmp2yt1nO19WGozEO1t0XDub19Rx7jNwOv7LLKPJbD9gkjZ/LlTxZuWjj8KJxWt45Hn+GWEueyqsDdRSH2ZuPDFpRza4V2E5SjuP8FO0+uQlb2qnSFH/psWwK/dikjvbqaAE6vZbel0xKzxg54n1NIni/olpWh/iiUB3I9o0w/UM/yXN8rh4CaYwyW8dOAql3dBhW42r+guFjXb6YfPq+zEbYhNjBLFk9hEV92qpCJ4xH+noNmszrO5Ybgp+AQDtxqIfsKX+841T1Ca401xPpYuPHGRe9Bmz96P/HmFOE8iXzQPwZMridZkTocwfoZjUxsFkxz3JJJ+vNwh7M7OmYqoTLSCUyX8RPqItPUmmBGnw0gYtGBQtgt3kHGlbOTR3c=
- provider: releases
api_key:
secure: @@@@@@@stanley api key
file: mocha-multi-reporters.tar.gz
skip_cleanup: true
on:
tags: true
repo: stanleyhlng/mocha-multi-reporters
branch: automatedRelease
node: "10"
- provider: script
skip_cleanup: true
script: ./scripts/publish.sh
on:
tags: true
branch: automatedRelease
node: "12"
97 changes: 97 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Changelog

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [1.4.0](https://github.com/you54f/cypress-multi-reporters/compare/v1.3.0...v1.4.0) (2020-05-12)



## [1.3.0](https://github.com/you54f/cypress-multi-reporters/compare/v1.2.4...v1.3.0) (2020-05-11)



### [1.2.4](https://github.com/you54f/cypress-multi-reporters/compare/v1.2.3...v1.2.4) (2020-02-12)



### [1.2.3](https://github.com/you54f/cypress-multi-reporters/compare/v1.2.1...v1.2.3) (2019-10-17)



### [1.2.2](https://github.com/you54f/cypress-multi-reporters/compare/v1.2.1...v1.2.2) (2019-10-17)



### [1.2.1](https://github.com/you54f/cypress-multi-reporters/compare/v1.2.0...v1.2.1) (2019-08-07)



## [1.2.0](https://github.com/you54f/cypress-multi-reporters/compare/v1.1.23...v1.2.0) (2019-07-08)


### Features

* **options:** add options in rc file ([#14](https://github.com/you54f/cypress-multi-reporters/issues/14)) ([5f633ec](https://github.com/you54f/cypress-multi-reporters/commit/5f633ec))



### [1.1.23](https://github.com/you54f/cypress-multi-reporters/compare/v1.1.22...v1.1.23) (2019-07-08)



### [1.1.22](https://github.com/you54f/cypress-multi-reporters/compare/v1.1.12...v1.1.22) (2019-06-07)


### Bug Fixes

* check reporter fix, by @cacaocake ([1dc3c9](https://github.com/you54f/cypress-multi-reporters/commit/1dc3c9))


### [1.1.21](https://github.com/you54f/cypress-multi-reporters/compare/v1.1.20...v1.1.21) (2019-06-03)



### [1.1.20](https://github.com/you54f/cypress-multi-reporters/compare/v1.1.19...v1.1.20) (2019-06-03)



### [1.1.19](https://github.com/you54f/cypress-multi-reporters/compare/v1.1.18...v1.1.19) (2019-06-03)



### [1.1.18](https://github.com/you54f/cypress-multi-reporters/compare/v1.1.17...v1.1.18) (2019-06-03)



### [1.1.17](https://github.com/you54f/cypress-multi-reporters/compare/v1.1.16...v1.1.17) (2019-06-03)



### [1.1.16](https://github.com/you54f/cypress-multi-reporters/compare/v1.1.15...v1.1.16) (2019-06-03)



### [1.1.15](https://github.com/you54f/cypress-multi-reporters/compare/v1.1.14...v1.1.15) (2019-06-03)


### Bug Fixes

* update all the deps ([f8cd4f8](https://github.com/you54f/cypress-multi-reporters/commit/f8cd4f8))



### [1.1.14](https://github.com/you54f/cypress-multi-reporters/compare/v1.1.13...v1.1.14) (2019-06-03)



### [1.1.13](https://github.com/you54f/cypress-multi-reporters/compare/v1.1.12...v1.1.13) (2019-06-03)


### Bug Fixes

* make compatible with mocha 6+ and earlier versions ([b8db10c](https://github.com/you54f/cypress-multi-reporters/commit/b8db10c))


### Build System

* automated pipeline ([88b06c7](https://github.com/you54f/cypress-multi-reporters/commit/88b06c7))
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
The MIT License (MIT)

Copyright (c) 2019 Yousaf Nabi
Copyright (c) 2015 Stanley Ng

Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
70 changes: 59 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
mocha-multi-reporters
===
## mocha-multi-reporters

Generate multiple mocha reports in a single mocha execution.

[![npm version](https://img.shields.io/npm/v/mocha-multi-reporters.svg?style=flat-square)](https://www.npmjs.com/package/mocha-multi-reporters)
[![StyleCI](https://styleci.io/repos/48823069/shield)](https://styleci.io/repos/48823069)
[![Build Status](https://travis-ci.org/stanleyhlng/mocha-multi-reporters.svg)](https://travis-ci.org/stanleyhlng/mocha-multi-reporters)
[![Coverage Status](https://coveralls.io/repos/stanleyhlng/mocha-multi-reporters/badge.svg?branch=master&service=github)](https://coveralls.io/github/stanleyhlng/mocha-multi-reporters?branch=master)
[![Dependency Status](https://img.shields.io/david/stanleyhlng/mocha-multi-reporters.svg?style=flat-square)](https://david-dm.org/stanleyhlng/mocha-multi-reporters)
[![devDependency Status](https://img.shields.io/david/dev/stanleyhlng/mocha-multi-reporters.svg?style=flat-square)](https://david-dm.org/stanleyhlng/mocha-multi-reporters#info=devDependencies)
![npm version](https://img.shields.io/npm/v/mocha-multi-reporters.svg)
![npm](https://img.shields.io/npm/dm/mocha-multi-reporters.svg)
[![Build Status](https://travis-ci.org/you54f/mocha-multi-reporters.svg)](https://travis-ci.org/you54f/mocha-multi-reporters)
[![Coverage Status](https://coveralls.io/repos/YOU54F/mocha-multi-reporters/badge.svg?branch=master&service=github)](https://coveralls.io/github/YOU54F/mocha-multi-reporters?branch=master)
[![Dependency Status](https://img.shields.io/david/you54f/mocha-multi-reporters.svg?style=flat-square)](https://david-dm.org/you54f/mocha-multi-reporters)
[![devDependency Status](https://img.shields.io/david/dev/you54f/mocha-multi-reporters.svg?style=flat-square)](https://david-dm.org/you54f/mocha-multi-reporters#info=devDependencies)


## Install

Expand Down Expand Up @@ -45,7 +45,27 @@ $ ./node_modules/.bin/mocha --reporter mocha-multi-reporters
</testsuite>
```

### Advanced
### Configuring reporters

Set the reporters configuration using `--reporter-options configFile=config.json`.
- Include reporters in `reporterEnabled` as a comma-delimited list
```js
{
"reporterEnabled": "spec, @my-org/custom"
}
```
- Specify each reporter's configuration using its camel-cased name, followed by `reporterOptions`, as key.
> For scoped reporters such as example @myorg/custom, remove all special characters.
```js
{
"reporterEnabled": "spec, @my-org/custom",
"myOrgCustomReporterOptions": {
// [...]
}
}
```

#### Examples:

* Generate `spec` and `json` reports.

Expand Down Expand Up @@ -215,12 +235,39 @@ $ cat xunit-custom.xml
</testsuites>
```

* When calling Mocha programmatically
### `cmrOutput` option

This option lets you dynamically replace the output files of reporter options.

In your Mocha `--reporterOptions`, specify `cmrOutput` with a plug-sign-separated
list of the reporter name, the property on that reporter's options to have replaced, and the dynamic ID you would like substituted. If you need multiple reporters
to have dynamic output, add additional plus-sign-separated lists separated by colons.

```sh
mocha --reporter mocha-multi-reporters --reporterOptions configFile=mocha-multi-reporters.json,cmrOutput=@mochajs/json-file-reporter+output+specialID tests
```

```js
// mocha-multi-reporters.json
{
"mochajsJsonFileReporterReporterOptions": {
"output": "tests/results/file-{id}.json"
},
"reporterEnabled": "spec, @mochajs/json-file-reporter"
}
```

This will produce an `output` for `@mochajs/json-file-reporter`
`reporterOptions` with the value:

> tests/results/file-specialID.json

### Programmatic

Note that when Mocha is called programmatically, it is passed an options object when created. This object is usually derived from a config file that your mocha test runner reads prior to instantiation. This is the object that must contain a key `reporter` with a value of `mocha-multi-reporters` for this plugin to be used. You can also pass the key `reporterOptions` with a value of any of the above listed config files (including the `reporterEnabled` subkey and any other plugin configuration information.) This removes the requirement to have an intermediate configuration file specifically for the multireporter configuration.

```js
var mocha = new Mocha({
const mocha = new Mocha({
reporter: "mocha-multi-reporters",
timeout: config.testTimeout || 60000,
slow: config.slow || 10000,
Expand All @@ -241,6 +288,7 @@ Note that it will first check if reporterOptions contains a `configFile` key, an

The MIT License (MIT)

Copyright(c) 2019 Yousaf Nabi
Copyright(c) 2017 Stanley Ng

Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
5 changes: 5 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = {
extends: ['@commitlint/config-conventional']
};