You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Within the test itself, spin up as many containers as required for independent testing. Be selective of what container you need, if you don't need an individual container for various setup, just use one container. Some test only required one container while others need different scenario with a clean chain.
describe('regtest without masternode',()=>{constcontainer=newRegTestContainer()constclient=newContainerAdapterClient(container)beforeAll(async()=>{awaitcontainer.start()awaitcontainer.waitForReady()})afterAll(async()=>{awaitcontainer.stop()})it('should setWalletFlag',async()=>{
...
})})describe('with masternode',()=>{constcontainer=newMasterNodeRegTestContainer()constclient=newContainerAdapterClient(container)beforeAll(async()=>{awaitcontainer.start()awaitcontainer.waitForReady()awaitcontainer.waitForWalletCoinbaseMaturity()})afterAll(async()=>{awaitcontainer.stop()})it('should setWalletFlag',async()=>{
...
})})
Why is this needed:
It’s getting very difficult to maintain side-effect and writing independent tests. Writing a clean and independent test is not easy, it requires a certain mastery with strong testing principles. Refactoring __tests__ in jellyfish-api-core will allow us to have a cleaner testing culture.
The text was updated successfully, but these errors were encountered:
What would you like to be added:
All test in
jellyfish-api-core
to be refactored such that they are independent with each file for each method.Within the test itself, spin up as many containers as required for independent testing. Be selective of what container you need, if you don't need an individual container for various setup, just use one container. Some test only required one container while others need different scenario with a clean chain.
Single Chain
Multiple Chains
Why is this needed:
It’s getting very difficult to maintain side-effect and writing independent tests. Writing a clean and independent test is not easy, it requires a certain mastery with strong testing principles. Refactoring
__tests__
injellyfish-api-core
will allow us to have a cleaner testing culture.The text was updated successfully, but these errors were encountered: