Skip to content
Compare
Choose a tag to compare
@github-actions github-actions released this 27 Nov 16:26
· 28 commits to main since this release
0adf8c6

Minor Changes

  • 2611f1d: Added support for custom parameter types, exactly as in CucumberJS.
    A simple example:

    // Step definition file
    defineParameterType({
      name: "updown",
      regexp: /(up|down)/,
    });
    Given("a number {int}", (world, num) => {
      world.number = num;
    });
    When("the number goes {updown} {int}", (world, updown, num) => {
      if (updown === "up") world.number += num;
      else world.number -= num;
    });
    Then("the number should be {int}", (world, num) => {
      expect(world.number).toBe(num);
    });
    Feature: Custom parameter types
      Scenario: The number
        Given a number 4
        When the number goes up 5
        Then the number should be 9

Patch Changes

  • a28faaa: Snippets are now well supported, producing async/await javascript with appropriate variables.
  • 0ddc22b: moved readme file for npmjs.com