Skip to content

Commit

Permalink
Fix inline diffs (#313)
Browse files Browse the repository at this point in the history
* Set mocha config in tdd script

* Replace deprecated mocha option

Mocha deprecated `useInlineDiffs` in favor of `inlineDiffs`

* Update CHANGELOG

Co-authored-by: Adam Gruber <[email protected]>
  • Loading branch information
adamgruber and Adam Gruber authored Apr 27, 2020
1 parent cefb2dd commit 1bd41ad
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# mochawesome changelog

## [Unreleased]
### Fixed
- Restore inline-diff rendering [#312](https://github.com/adamgruber/mochawesome/issues/312)

## [6.1.0] - 2020-04-13
### Changed
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"test:prog": "node ./test-programmatic",
"test:mem": "mocha test-functional/mem-test.js --config test-functional/.mocharc.json",
"test:ctx": "mocha test-functional/test-context.js --config test-functional/.mocharc.json",
"tdd": "npm run lint && cross-env NODE_ENV=test nyc mocha --watch",
"tdd": "npm run lint && cross-env NODE_ENV=test nyc mocha --config test/.mocharc.json --watch",
"prepack": "npm run test"
},
"author": "Adam Gruber",
Expand Down
2 changes: 1 addition & 1 deletion src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module.exports = function (opts) {
saveHtml: _getOption('html', reporterOpts, true, true),
saveJson: _getOption('json', reporterOpts, true, true),
consoleReporter: _getOption('consoleReporter', reporterOpts, false, 'spec'),
useInlineDiffs: !!opts.useInlineDiffs,
useInlineDiffs: !!opts.inlineDiffs,
code: noCode ? false : code
};
};
2 changes: 1 addition & 1 deletion test/reporter.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ describe('Mochawesome Reporter', () => {

describe('mocha options', () => {
beforeEach(() => {
mochaReporter = makeReporter({ useInlineDiffs: true });
mochaReporter = makeReporter({ inlineDiffs: true });
});

it('should transfer mocha options', done => {
Expand Down

0 comments on commit 1bd41ad

Please sign in to comment.