Skip to content

Commit

Permalink
chore: increase wait for dom tests (scalar#1618)
Browse files Browse the repository at this point in the history
  • Loading branch information
hanspagel authored May 6, 2024
1 parent 4b74ec0 commit 5922275
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/api-reference/src/standalone.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { afterAll, describe, expect, it } from 'vitest'
import MatchMediaMock from 'vitest-matchmedia-mock'

import { sleep } from './helpers'
import { type ReferenceProps } from './types'
import type { ReferenceProps } from './types'

/**
* Tests for standalone
Expand All @@ -29,7 +29,7 @@ describe('Standalone API References', () => {
document.body.appendChild(script)

await import('./standalone')
await sleep(10)
await sleep(50)

const rootElement = document.querySelector('[data-v-app]')
const reference = rootElement?.querySelector('.scalar-api-reference')
Expand All @@ -49,7 +49,7 @@ describe('Standalone API References', () => {

// Now we use the event to re-load the app
document.dispatchEvent(new Event('scalar:reload-references'))
await sleep(10)
await sleep(50)

rootElement = document.querySelector('[data-v-app]')
const reference = rootElement?.querySelector('.scalar-api-reference')
Expand All @@ -71,7 +71,7 @@ describe('Standalone API References', () => {
} satisfies ReferenceProps,
})
document.dispatchEvent(ev)
await sleep(10)
await sleep(50)

const rootElement = document.querySelector('[data-v-app]')
const h1 = rootElement?.querySelector('h1')
Expand Down

0 comments on commit 5922275

Please sign in to comment.