Skip to content

Commit

Permalink
Merge branch 'master' into renovate/eslint-7.x
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-molak committed Jun 28, 2021
2 parents 32b50a6 + 49c8de4 commit cb19716
Show file tree
Hide file tree
Showing 39 changed files with 1,204 additions and 5,175 deletions.
4 changes: 4 additions & 0 deletions .eslintrc.js
Expand Up @@ -34,6 +34,10 @@ module.exports = {
'max': 1,
}],

'@typescript-eslint/explicit-module-boundary-types': ['error', {
'allowHigherOrderFunctions': true
}],

'indent': 'off',
'@typescript-eslint/indent': ['error', 4, {
'MemberExpression': 'off',
Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.md
Expand Up @@ -3,6 +3,28 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.29.5](https://github.com/serenity-js/serenity-js/compare/v2.29.4...v2.29.5) (2021-06-28)


### Bug Fixes

* **cucumber:** support for reporting Node AssertionErrors thrown in Cucumber scenarios ([3d9cdb7](https://github.com/serenity-js/serenity-js/commit/3d9cdb745cd14f136b942786b449375f1a00d969)), closes [cucumber/cucumber-js#1453](https://github.com/cucumber/cucumber-js/issues/1453) [#887](https://github.com/serenity-js/serenity-js/issues/887)





## [2.29.4](https://github.com/serenity-js/serenity-js/compare/v2.29.3...v2.29.4) (2021-06-24)


### Bug Fixes

* **core:** support for reporting Node-specific assertion errors ([3d2ca1f](https://github.com/serenity-js/serenity-js/commit/3d2ca1fe7e3e4d0fe6445b9807a5875d140042bf))





## [2.29.3](https://github.com/serenity-js/serenity-js/compare/v2.29.2...v2.29.3) (2021-06-17)


Expand Down
@@ -1,4 +1,4 @@
Feature: Reports failing scenarios
Feature: Reports errors in scenarios

In order to see how Serenity/JS reports a failing Cucumber scenario
As a curious developer
Expand Down
Expand Up @@ -4,10 +4,17 @@ Feature: Reports failing scenarios
As a curious developer
I'd like to see an example implementation

Scenario: A failing scenario
Scenario: A scenario failing with a Serenity/JS AssertionError

Here's an example of a scenario failing due to an assertion error.
The rule here is simple: provided that one of the steps fail the scenario fails as well.

Given a step that passes
And a step that fails with an assertion error
And a step that fails with a Serenity/JS AssertionError

Scenario: A scenario failing with a Node.js AssertionError

Did you know thatSerenity/JS picks up generic AssertionErrors too?

Given a step that passes
And a step that fails with a Node.js AssertionError
@@ -1,12 +1,17 @@
import { AssertionError, TestCompromisedError } from '@serenity-js/core';
import { Given, DataTable, Then, When } from '@cucumber/cucumber';
import { strictEqual } from 'assert';

Given(/^.*step.*passes$/, function () {
return Promise.resolve();
});

Given(/^.*step.*fails with an assertion error$/, function () {
return Promise.reject(new AssertionError('expected true to equal false', false, true));
Given(/^.*step.*fails with a Serenity\/JS AssertionError$/, function () {
throw new AssertionError('expected true to equal false', false, true);
});

Given(/^.*step.*fails with a Node.js AssertionError$/, function () {
strictEqual(true, false);
});

Given(/^.*step.*fails with a generic error$/, function () {
Expand Down
2 changes: 1 addition & 1 deletion integration/cucumber/package.json
Expand Up @@ -42,6 +42,6 @@
},
"devDependencies": {
"@types/mocha": "^8.2.2",
"mocha": "^9.0.0"
"mocha": "^9.0.1"
}
}
2 changes: 1 addition & 1 deletion integration/jasmine/package.json
Expand Up @@ -38,6 +38,6 @@
},
"devDependencies": {
"@types/mocha": "^8.2.2",
"mocha": "^9.0.0"
"mocha": "^9.0.1"
}
}
4 changes: 2 additions & 2 deletions integration/mocha/package.json
Expand Up @@ -34,10 +34,10 @@
"@serenity-js/assertions": "^2.0.0",
"@serenity-js/core": "^2.0.0",
"@serenity-js/mocha": "^2.0.0",
"mocha": "^9.0.0"
"mocha": "^9.0.1"
},
"devDependencies": {
"@types/mocha": "^8.2.2",
"mocha": "^9.0.0"
"mocha": "^9.0.1"
}
}
2 changes: 1 addition & 1 deletion integration/protractor-cucumber/package.json
Expand Up @@ -39,6 +39,6 @@
},
"devDependencies": {
"@types/mocha": "^8.2.2",
"mocha": "^9.0.0"
"mocha": "^9.0.1"
}
}
2 changes: 1 addition & 1 deletion integration/protractor-jasmine/package.json
Expand Up @@ -39,6 +39,6 @@
},
"devDependencies": {
"@types/mocha": "^8.2.2",
"mocha": "^9.0.0"
"mocha": "^9.0.1"
}
}
2 changes: 1 addition & 1 deletion integration/protractor-mocha/package.json
Expand Up @@ -38,6 +38,6 @@
},
"devDependencies": {
"@types/mocha": "^8.2.2",
"mocha": "^9.0.0"
"mocha": "^9.0.1"
}
}
10 changes: 9 additions & 1 deletion lerna.json
Expand Up @@ -23,7 +23,7 @@
"integration/**",
"packages/**"
],
"version": "2.29.3",
"version": "2.29.5",
"command": {
"create": {
"homepage": "https://serenity-js.org",
Expand All @@ -43,6 +43,14 @@
}
},
"ignoreChanges": [
"./.eslintrc.js",
"./.esdoc.js",
"./.esdoc-patches.js",
"./.mocharc.yml",
"./.npmignore",
"./.nvmrc",
"./gh-pages.js",
"./Makefile",
"**/*.md",
"**/spec/**",
"./package.json",
Expand Down

0 comments on commit cb19716

Please sign in to comment.