chore: replace asset to with at import statement (#14607)
This commit is contained in:
parent
d6bd954f1c
commit
9847c0f0c6
9 changed files with 23 additions and 23 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { vi } from 'vitest'
|
||||
import tracelog from '../../../../packages/wdio-lighthouse-service/tests/__fixtures__/tracelog.json' assert { type: 'json' }
|
||||
import tracelog from '../../../../packages/wdio-lighthouse-service/tests/__fixtures__/tracelog.json' with { type: 'json' }
|
||||
|
||||
export const beginTrace = vi.fn()
|
||||
export const endTrace = vi.fn().mockResolvedValue(tracelog)
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ const packages = (
|
|||
url.pathToFileURL(
|
||||
path.resolve(rootDir, 'packages', project, 'package.json')
|
||||
).href,
|
||||
{ assert: { type: 'json' } }
|
||||
{ with: { type: 'json' } }
|
||||
)
|
||||
return [project, pkg.default]
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import type { BrowserstackConfig } from './types.js'
|
||||
import pkg from '../package.json' assert { type: 'json' }
|
||||
import pkg from '../package.json' with { type: 'json' }
|
||||
|
||||
const bstackServiceVersion = pkg.version
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import TraceGatherer from '../../src/gatherer/trace.js'
|
|||
import { FRAME_LOAD_START_TIMEOUT, CLICK_TRANSITION } from '../../src/constants.js'
|
||||
import type { GathererDriver } from '../../src/types.js'
|
||||
|
||||
import TRACELOG from '../__fixtures__/tracelog.json' assert { type: 'json' }
|
||||
import TRACELOG from '../__fixtures__/tracelog.json' with { type: 'json' }
|
||||
|
||||
vi.mock('lighthouse/lighthouse-core/fraggle-rock/gather/session')
|
||||
vi.mock('lighthouse/lighthouse-core/gather/driver/wait-for-condition')
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import type { CDPSession } from 'puppeteer-core/lib/esm/puppeteer/common/Connect
|
|||
|
||||
import NetworkHandler from '../../src/handler/network.js'
|
||||
|
||||
import eventLog from '../__fixtures__/events.json' assert { type: 'json' }
|
||||
import eventLog from '../__fixtures__/events.json' with { type: 'json' }
|
||||
|
||||
vi.mock('puppeteer-core/lib/esm/puppeteer/common/Connection.js')
|
||||
|
||||
|
|
|
|||
|
|
@ -3,19 +3,19 @@ import type { Capabilities } from '@wdio/types'
|
|||
|
||||
import { sessionEnvironmentDetector, capabilitiesEnvironmentDetector } from '../src/envDetector.js'
|
||||
|
||||
import appiumResponse from './__fixtures__/appium.response.json' assert { type: 'json' }
|
||||
import experitestResponse from './__fixtures__/experitest.response.json' assert { type: 'json' }
|
||||
import chromedriverResponse from './__fixtures__/chromedriver.response.json' assert { type: 'json' }
|
||||
import geckodriverResponse from './__fixtures__/geckodriver.response.json' assert { type: 'json' }
|
||||
import ghostdriverResponse from './__fixtures__/ghostdriver.response.json' assert { type: 'json' }
|
||||
import safaridriverResponse from './__fixtures__/safaridriver.response.json' assert { type: 'json' }
|
||||
import safaridriverdockerNpNResponse from './__fixtures__/safaridriverdockerNpN.response.json' assert { type: 'json' }
|
||||
import safaridriverdockerNbVResponse from './__fixtures__/safaridriverdockerNbV.response.json' assert { type: 'json' }
|
||||
import safaridriverLegacyResponse from './__fixtures__/safaridriver.legacy.response.json' assert { type: 'json' }
|
||||
import edgedriverResponse from './__fixtures__/edgedriver.response.json' assert { type: 'json' }
|
||||
import seleniumstandaloneResponse from './__fixtures__/standaloneserver.response.json' assert { type: 'json' }
|
||||
import seleniumstandalone4Response from './__fixtures__/standaloneserver4.response.json' assert { type: 'json' }
|
||||
import bidiResponse from './__fixtures__/bidi.response.json' assert { type: 'json' }
|
||||
import appiumResponse from './__fixtures__/appium.response.json' with { type: 'json' }
|
||||
import experitestResponse from './__fixtures__/experitest.response.json' with { type: 'json' }
|
||||
import chromedriverResponse from './__fixtures__/chromedriver.response.json' with { type: 'json' }
|
||||
import geckodriverResponse from './__fixtures__/geckodriver.response.json' with { type: 'json' }
|
||||
import ghostdriverResponse from './__fixtures__/ghostdriver.response.json' with { type: 'json' }
|
||||
import safaridriverResponse from './__fixtures__/safaridriver.response.json' with { type: 'json' }
|
||||
import safaridriverdockerNpNResponse from './__fixtures__/safaridriverdockerNpN.response.json' with { type: 'json' }
|
||||
import safaridriverdockerNbVResponse from './__fixtures__/safaridriverdockerNbV.response.json' with { type: 'json' }
|
||||
import safaridriverLegacyResponse from './__fixtures__/safaridriver.legacy.response.json' with { type: 'json' }
|
||||
import edgedriverResponse from './__fixtures__/edgedriver.response.json' with { type: 'json' }
|
||||
import seleniumstandaloneResponse from './__fixtures__/standaloneserver.response.json' with { type: 'json' }
|
||||
import seleniumstandalone4Response from './__fixtures__/standaloneserver4.response.json' with { type: 'json' }
|
||||
import bidiResponse from './__fixtures__/bidi.response.json' with { type: 'json' }
|
||||
|
||||
describe('sessionEnvironmentDetector', () => {
|
||||
const chromeCaps = chromedriverResponse.value as WebdriverIO.Capabilities
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ import path from 'node:path'
|
|||
import { downloadFromGitHub } from '../utils/index.js'
|
||||
import { buildPreface } from '../utils/helpers.js'
|
||||
|
||||
import reporters3rdParty from './3rd-party/reporters.json' assert { type: 'json' }
|
||||
import services3rdParty from './3rd-party/services.json' assert { type: 'json' }
|
||||
import api3rdParty from './3rd-party/api.json' assert { type: 'json' }
|
||||
import reporters3rdParty from './3rd-party/reporters.json' with { type: 'json' }
|
||||
import services3rdParty from './3rd-party/services.json' with { type: 'json' }
|
||||
import api3rdParty from './3rd-party/api.json' with { type: 'json' }
|
||||
|
||||
interface Plugin {
|
||||
packageName: string
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
import shell from 'shelljs'
|
||||
|
||||
import pkg from '../lerna.json' assert { type: 'json' }
|
||||
import pkg from '../lerna.json' with { type: 'json' }
|
||||
|
||||
console.log('\nPushing release tag...')
|
||||
shell.exec(`git push origin refs/tags/v${pkg.version} -f --no-verify`)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import { Upload } from '@aws-sdk/lib-storage'
|
|||
import mime from 'mime-types'
|
||||
import readDir from 'recursive-readdir'
|
||||
|
||||
import pkg from '../lerna.json' assert { type: 'json' }
|
||||
import pkg from '../lerna.json' with { type: 'json' }
|
||||
|
||||
const __dirname = path.dirname(url.fileURLToPath(import.meta.url))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue