0.1.6 • Published 2 years ago

test-machine v0.1.6

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

THE LIBRARY WILL BE RENAMED @core/test-machine, this package will be archived in 6 months please switch

For testing xstate machines

The package helps to run test for Observable Xstate machine

It's built with tsdx framework

Two functions are used :

generateSyncMachineTest :

As the name says, it's for synchronous machines which don't use promises

N.B/Changes : In the version 0.1.4, we have a correction, the number of values is the number of events + 1. It was an error of comprehension. So you test the initial state given by the variable 'initialState' or the initial context of the context. After, you test the others.

generateAsyncMachineTest :

The main function with an waiterBeforeEachEvent variable. It is responsible to wait before each emission of an event.

Since we deal with Observable, we add an timeout variable to cancel test after a certain amount of time.

Hope you enjoy these two functions !

0.1.6

2 years ago

0.1.52

3 years ago

0.1.51

3 years ago

0.1.52-alpha.0

3 years ago

0.1.5

3 years ago

0.1.3-1

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.3-0

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago