manda putra
manda putra
KKysely
Created by manda putra on 7/13/2023 in #help
Question : How do you write integration test, and avoid flakynees?
And for before each individual test do you mean like this?
describe('test 1', () => {
test('1.0', async () => {
await nukeAndPopulate()
})
test('2.0', async () => {
await nukeAndPopulate()
})
})
describe('test 1', () => {
test('1.0', async () => {
await nukeAndPopulate()
})
test('2.0', async () => {
await nukeAndPopulate()
})
})
Or is it like this :
beforeAll(async () => {
await nukeAndPopulate()
})

describe('test 1', () => {
test('1.0', async () => {
//...
})
test('2.0', async () => {
//...
})
})
beforeAll(async () => {
await nukeAndPopulate()
})

describe('test 1', () => {
test('1.0', async () => {
//...
})
test('2.0', async () => {
//...
})
})
7 replies
KKysely
Created by manda putra on 7/13/2023 in #help
Question : How do you write integration test, and avoid flakynees?
@koskimas how do you nuke and populate? Is it just a simple drop db and then populate again using predefined sql backup?
7 replies