Skip to content

Commit

Permalink
hooks: prove that tags cascade from feature when matching in hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjgoss committed Feb 3, 2020
1 parent ab8d37a commit 36a354a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions features/tagged_hooks.feature
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ Feature: Tagged Hooks
Scenario: ability to specify tags for hooks
Given a file named "features/a.feature" with:
"""
@bar
Feature:
Scenario:
Then the value is 0
Then the value is 1
@foo
Scenario:
Then the value is 1
Then the value is 2
"""
And a file named "features/step_definitions/world.js" with:
"""
Expand All @@ -38,6 +39,10 @@ Feature: Tagged Hooks
Before({tags: '@foo'}, function() {
this.value += 1
})
Before({tags: '@bar'}, function() {
this.value += 1
})
"""
When I run cucumber-js
Then it passes

0 comments on commit 36a354a

Please sign in to comment.