18.1.1 • Published 5 months ago

@wixc3/testing-node v18.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

npm version @wixc3/testing-node on Github

Home > @wixc3/testing-node

testing-node package

Utils for making mocha + chai testing easy and fun

Remarks

Steps

Steps are a convenient way to craft async tests. A step has a timeout and a description, making test timeouts easy to understand and debug. Each step timeout auto increases the test timeout, assuring the step will time out before the test

Available steps:

  • adds timeout and description to a promise]

  • time limited Promise.all

  • spies on a method and wait for first call

  • creates a one off stub and wait for it to be called

  • adds a description (but not timeout) to a promise, useful for playwright locator waitFor

  • sleep (and adjust test time)

Test timeout manipulation

  • DEBUG=true env variable will set test timeouts and time dilation to infinity so tests (that don't explicitly override timeout) will not time out on breakpoints

  • multiplies timeouts when debugging or running on slow CI machines

  • adjusts current test timeout (for use in non step async actions)

  • creates a locator timeout and adjust the current test

Functions

FunctionDescription
createTestDir(prefix, disposalOptions, disposeAfter)Creates a test temporary directory The directory will be deleted after the test, thus not suitable for suites ("describe")

Variables

VariableDescription
DISPOSE_OF_TEMP_DIRS
18.1.1

5 months ago

18.1.0

5 months ago

18.0.0

6 months ago

17.1.1

1 year ago

17.1.0

1 year ago

17.0.0

1 year ago

16.3.0

1 year ago

16.2.1

1 year ago

16.2.0

1 year ago

16.1.3

1 year ago

16.1.0

1 year ago

16.0.0

1 year ago

15.2.0

1 year ago

15.3.0

1 year ago

15.3.1

1 year ago

15.1.1

1 year ago

15.1.0

1 year ago

15.0.0

1 year ago

14.1.1

2 years ago

14.1.2

2 years ago

14.1.3

2 years ago

14.0.0

2 years ago

14.1.0

2 years ago

13.4.0

2 years ago

13.3.2

2 years ago

13.2.0

2 years ago

13.3.0

2 years ago

13.0.0

2 years ago

13.1.0

2 years ago

13.0.1

2 years ago

12.0.3

2 years ago

12.1.0

2 years ago

12.0.1

2 years ago

12.0.2

2 years ago

11.2.0

2 years ago

11.1.1

2 years ago

11.3.0

2 years ago

11.1.0

2 years ago

11.0.0

2 years ago

9.2.1

2 years ago

8.2.1

2 years ago

10.0.0

2 years ago

9.2.0

2 years ago

9.1.0

2 years ago

9.0.0

2 years ago

8.1.0

2 years ago

8.0.0

2 years ago

8.2.0

2 years ago

7.2.0

2 years ago

7.0.3

2 years ago

7.0.2

2 years ago

7.0.1

2 years ago

7.0.0

2 years ago

6.4.1

2 years ago