I'm trying to use Jest to test my promisized oboe usage, using oboe-promise as mentioned in #168. My problem is Jest times out but running outside of Jest via node command line it works. Any ideas? Thanks.
"use strict"
// Classes
let Example // class under test
// Objects
let example // object under test
describe('Example', () => {
beforeEach(() => {
Example = require('../../src/Example')
example = new Example()
})
test('run', async () => {
expect(await example.run()).toEqual(JSON.stringify([{obj1: {name: 'example', value: 5}}, {obj2: {value: 0, name: 'other'}}]))
})
})
When I run my Jest test I get "Async callback was not invoked within the 5000 ms timeout specified by jest.setTimeout." I've added jest.setTimeout(60000) and get same result. I have other Jest tests that test asynchronous non-oboe code and they work fine using the async/await
I'm trying to use Jest to test my promisized oboe usage, using oboe-promise as mentioned in #168. My problem is Jest times out but running outside of Jest via node command line it works. Any ideas? Thanks.
My code
My test file
When I run my Jest test I get "Async callback was not invoked within the 5000 ms timeout specified by jest.setTimeout." I've added jest.setTimeout(60000) and get same result. I have other Jest tests that test asynchronous non-oboe code and they work fine using the async/await
pattern.
The code works if I run the code outside of Jest using: