1616 */
1717import { store , Store } from '../store'
1818import { injectBundle } from './injectBundle'
19- import type { SpecFile } from '@packages/types/src/spec'
19+ import type { BaseSpec } from '@packages/types/src/spec'
2020import { UnifiedReporterAPI } from './reporter'
21- import { getRunnerElement } from './utils'
22-
23- function empty ( el : HTMLElement ) {
24- while ( el . lastChild ) {
25- if ( el && el . firstChild ) {
26- el . removeChild ( el . firstChild )
27- }
28- }
29- }
21+ import { getRunnerElement , empty } from './utils'
3022
3123const randomString = `${ Math . random ( ) } `
3224
@@ -52,7 +44,7 @@ function setupRunner (done: () => void) {
5244/**
5345 * Get the URL for the spec. This is the URL of the AUT IFrame.
5446 */
55- function getSpecUrl ( namespace : string , spec : SpecFile , prefix = '' ) {
47+ function getSpecUrl ( namespace : string , spec : BaseSpec , prefix = '' ) {
5648 return spec ? `${ prefix } /${ namespace } /iframes/${ spec . absolute } ` : ''
5749}
5850
@@ -71,7 +63,7 @@ function teardownSpec (store: Store) {
7163 * Cypress on it.
7264 *
7365 */
74- function setupSpec ( spec : SpecFile ) {
66+ function setupSpec ( spec : BaseSpec ) {
7567 // @ts -ignore - TODO: figure out how to manage window.config.
7668 const config = window . config
7769
@@ -136,7 +128,7 @@ function initialize (ready: () => void) {
136128 * 5. Setup the spec. This involves a few things, see the `setupSpec` function's
137129 * description for more information.
138130 */
139- async function executeSpec ( spec : SpecFile ) {
131+ async function executeSpec ( spec : BaseSpec ) {
140132 store . setSpec ( spec )
141133
142134 await UnifiedReporterAPI . resetReporter ( )
0 commit comments