Skip to content

Commit

Permalink
CCK: Reconcile unknown-parameter-type (#61)
Browse files Browse the repository at this point in the history
* Standardise error message and all unknowns for unknown param type

* Raise runtime error
  • Loading branch information
luke-hill authored Oct 11, 2023
1 parent aebbff4 commit b3ae076
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ Feature: Parameter Types
an unknown parameter type, but the suite will run.

Scenario: undefined parameter type
Given CDG is closed because of a strike
Given CDG is closed because of a strike
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { Given } from '@cucumber/fake-cucumber'

// eslint-disable-next-line @typescript-eslint/no-unused-vars
Given('{airport} is closed because of a strike', function (airport) {
throw new Error('Should not be called because airport type not defined')
throw new Error('Should not be called because airport parameter type has not been defined')
})
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

Given('{airport} is closed because of a strike') do |airport|
raise StandardError, 'Should not be called because airport type not defined'
Given('{airport} is closed because of a strike') do |_airport|
raise 'Should not be called because airport parameter type has not been defined'
end

0 comments on commit b3ae076

Please sign in to comment.