test: improve test resiliency again (#345)

This commit is contained in:
Nolan Lawson 2023-06-18 12:27:19 -07:00 committed by GitHub
parent 9eece6c3e2
commit ad490854ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 8 deletions

View File

@ -14,11 +14,15 @@ import { DEFAULT_CATEGORY_SORTING, DEFAULT_SKIN_TONE_EMOJI } from '../../../src/
describe('attributes tests', () => {
beforeEach(async () => {
basicBeforeEach()
mockFrenchDataSource()
await basicBeforeEach()
await mockFrenchDataSource()
await tick(40)
})
afterEach(async () => {
await tick(40)
await basicAfterEach()
await tick(40)
})
afterEach(basicAfterEach)
test('setting initial locale/dataSource issues only one GET', async () => {
const picker = new Picker()

View File

@ -4,11 +4,15 @@ import { DEFAULT_DATA_SOURCE } from '../../../src/database/constants'
describe('properties', () => {
beforeEach(async () => {
basicBeforeEach()
mockFrenchDataSource()
await basicBeforeEach()
await mockFrenchDataSource()
await tick(40)
})
afterEach(async () => {
await tick(40)
await basicAfterEach()
await tick(40)
})
afterEach(basicAfterEach)
test('setting initial dataSource and locale', async () => {
const picker = new Picker()