Skip to content

Commit

Permalink
Re-word configuration error messages
Browse files Browse the repository at this point in the history
This now corresponds more closely to the original error.
  • Loading branch information
badeball committed Mar 1, 2024
1 parent 06cd089 commit 1e3185b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions features/suite_only_options.feature
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Feature: suite only options
Then it fails
And the output should contain
"""
Tag testIsolation can only be used on a Feature or a Rule
The `testIsolation` configuration can only be overridden from a suite-level override (in Cucumber-terms this means on a Feature or Rule).
"""

Scenario: Configuring testIsolation on a Scenario Outline
Expand All @@ -105,7 +105,7 @@ Feature: suite only options
Then it fails
And the output should contain
"""
Tag testIsolation can only be used on a Feature or a Rule
The `testIsolation` configuration can only be overridden from a suite-level override (in Cucumber-terms this means on a Feature or Rule).
"""

Scenario: Configuring testIsolation on Examples
Expand All @@ -131,5 +131,5 @@ Feature: suite only options
Then it fails
And the output should contain
"""
Tag testIsolation can only be used on a Feature or a Rule
The `testIsolation` configuration can only be overridden from a suite-level override (in Cucumber-terms this means on a Feature or Rule).
"""
2 changes: 1 addition & 1 deletion lib/browser-runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ function createPickle(context: CompositionContext, pickle: messages.Pickle) {
for (const entry of testSpecificOptions) {
if (isExclusivelySuiteConfiguration(entry)) {
throw new Error(
`Tag ${entry[0]} can only be used on a Feature or a Rule`
`The \`${entry[0]}\` configuration can only be overridden from a suite-level override (in Cucumber-terms this means on a Feature or Rule).`
);
}
}
Expand Down

0 comments on commit 1e3185b

Please sign in to comment.