Skip to content

Commit

Permalink
deflake tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ivojawer committed Jan 25, 2025
1 parent 97eb395 commit ecbfb7e
Showing 1 changed file with 37 additions and 32 deletions.
69 changes: 37 additions & 32 deletions packages/debug-adapter/src/test/debug-adapter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,43 +168,48 @@ describe('debug adapter', function () {
})

describe('finished execution', function (){
it('finishing without errors', async function (){
await Promise.all([
it('finishing with errors', function (){
return new Promise((resolve) => {
dc.launch({
"stopOnEntry": false,
"target": {
"file": TEST_FILE,
type: "test",
"describe": "some tests",
"test": "does not break",
},
}),
dc.configurationDoneRequest(),
])
await Promise.all([
dc.assertOutput('stdout', "Finished executing without errors", 2000),
dc.waitForEvent('terminated', 2000),
])
"stopOnEntry": false,
"target": {
"file": TEST_FILE,
type: "test",
"describe": "some tests",
"test": "breaks",
},
}).then(async () => {
await Promise.all([
dc.assertOutput('stderr', "My exception message", 3000),
dc.waitForEvent('terminated', 2000)
])
resolve("Finished")
})
dc.configurationDoneRequest()
})
})

it('finishing with errors', async function (){
await Promise.all([
it('finishing without errors', function (){
return new Promise((resolve) => {
dc.launch({
"stopOnEntry": false,
"target": {
"file": TEST_FILE,
type: "test",
"describe": "some tests",
"test": "breaks",
},
}),
dc.configurationDoneRequest(),
])
await Promise.all([
dc.assertOutput('stderr', "My exception message", 2000),
dc.waitForEvent('terminated', 2000),
])
"stopOnEntry": false,
"target": {
"file": TEST_FILE,
type: "test",
"describe": "some tests",
"test": "does not break",
},
}).then(async () => {
await Promise.all([
dc.assertOutput('stdout', "Finished executing without errors", 1000),
dc.waitForEvent('terminated', 1000)
])
resolve("Finished")
})
dc.configurationDoneRequest()
})
})

})
})

Expand Down

0 comments on commit ecbfb7e

Please sign in to comment.