Weird behaviour with imported sequence tests
See original GitHub issueIt seems like there’s something weird going on when a test is imported to be used in a plan of plans.
index.js
import zora from 'zora'
import example from './example.js'
zora()
.test(example)
.run()
example.js
import zora from 'zora'
export default zora({sequence: true})
.test('is run before', async assert => {
await new Promise(resolve => setTimeout(() => resolve(), 1000))
console.log('before')
assert.ok(true, 'before')
})
.test('is run after', assert => {
console.log('after')
assert.ok(true, 'after')
})
Now, ‘after’ is logged at once, followed by ‘before’ after a second, if you run node -r @std/esm index.js
.
If I append .run()
and remove export default
from example.js, and run it directly - it works!
‘before’ pops up first, followed by ‘after’.
Thought I’d let you know, even though the sequenced option is not yet documented 😃
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (4 by maintainers)
Top Results From Across the Web
Weird behaviour in 32bit mode with image sequences
I would like to know if someone is able to reproduce the issue I face. Import an image sequence in a 32bit project...
Read more >Import image as sequence ignore most of the images #3585
Steps to reproduce the behavior: Click on import files select first image of sequence and click open Selec...
Read more >Python 3.6 project structure leads to RuntimeWarning
Reading through the bug report, it appears that there is a double-import which happens, and this RuntimeWarning is correct in alerting the user....
Read more >Testing SVA Properties and Sequences - Verification Gentleman
It compiles, but the behaviour is really strange and different from when importing from a package. Example: expect(my_if.prop). Are you allowed ...
Read more >Weird audio problem from imported Avid sequence - Autodesk ...
Hello, Strangely I have imported an Avid aaf and randomly some of the audio on the timeline just doesn't have a waveform or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No this is “normal” behaviour. For performance reasons tests are run in parallel (but reported in sequence). If you wish to respect the sequence you can pass the option
{sequence:true}
when you create your plan:Ahh, great to know. Currently rolling with just a simple
import './tests/set.js'
- works for now!