Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 966 Bytes

README.md

File metadata and controls

37 lines (27 loc) · 966 Bytes

Find out with TDD

Small utility repo with out-of-box TDD environment tolerating failing cases. Tests are failing until one approach finally returns desired result.

describe("testing of approaches", () => {
  const EXPECTED_RESULT = "Ok"

  const tester = new ApproachesTester(EXPECTED_RESULT)

  afterAll(() => {
    tester.printResult()
    tester.verifyIfSomeApproachSucceed()
  })

  it.each`
    approach     | approachName
    ${approach1} | ${"First test approach"}
    ${approach2} | ${"Second test approach"}
    ${approach3} | ${"Third test approach"}
  `("should try run $approachName", async ({approach, approachName}) => {
    await tester.testApproach(approach, approachName)
  })
})

Setup

Install deps and run in debug mode:

How to

Here is some motivation embracing failures

1 2 3