Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Seroxdesign committed Jun 24, 2024
1 parent 4e5d50a commit c48386b
Show file tree
Hide file tree
Showing 15 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions packages/cache/test/createCache.test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { afterAll, afterEach, describe, expect, it, vi } from 'vitest'

import path from 'node:path'
import * as GetUniqueWalletSetupFunctions from '../src/utils/getUniqueWalletSetupFunctions'
import * as TriggerCacheCreation from '../src/utils/triggerCacheCreation'
import type { BrowserContext, Page } from 'playwright-core'
import { createCache } from '../src/createCache'
import * as GetUniqueWalletSetupFunctions from '../src/utils/getUniqueWalletSetupFunctions'
import * as TriggerCacheCreation from '../src/utils/triggerCacheCreation'

const ROOT_DIR = '/tmp'

Expand Down
2 changes: 1 addition & 1 deletion packages/cache/test/downloadFile.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,4 @@ describe('downloadFile', () => {
expect(axiosGetSpy).toHaveBeenCalledOnce()
})
})
})
})
4 changes: 2 additions & 2 deletions packages/cache/test/ensureCacheDirExists.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import path from 'node:path'
import { CACHE_DIR_NAME } from '../src'
import { ensureCacheDirExists } from '../src/ensureCacheDirExists'
import fs from 'fs-extra'
import { afterAll, afterEach, describe, expect, it, vi } from 'vitest'
import { CACHE_DIR_NAME } from '../src'
import { ensureCacheDirExists } from '../src/ensureCacheDirExists'

vi.mock('fs-extra', async () => {
return {
Expand Down
2 changes: 1 addition & 1 deletion packages/cache/test/unzipArchive.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,4 @@ describe('unzipArchive', () => {
expect(fs.readFileSync(NESTED_FILE_OUTPUT_PATH, 'utf8')).toBe(ARCHIVE_CONTENTS[NESTED_FILE_NAME])
})
})
})
})
2 changes: 1 addition & 1 deletion packages/cache/test/utils/bytesToMegabytes.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { bytesToMegabytes } from "../../src"
import { describe, expect, it } from 'vitest'
import { bytesToMegabytes } from '../../src'

describe('bytesToMegabytes', () => {
it('converts bytes to megabytes and rounds the result', async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createCacheForWalletSetupFunction } from '../../src'
import * as WaitForExtensionOnLoadPage from '../../src/utils/waitForExtensionOnLoadPage'
import { chromium } from 'playwright-core'
import { afterAll, afterEach, beforeAll, describe, expect, it, vi } from 'vitest'
import { createCacheForWalletSetupFunction } from '../../src'
import * as WaitForExtensionOnLoadPage from '../../src/utils/waitForExtensionOnLoadPage'

const EXTENSION_PATH = '/tmp/extension'
const CONTEXT_PATH = '/tmp/context'
Expand Down
2 changes: 1 addition & 1 deletion packages/cache/test/utils/createTempContextDir.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ describe('createTempContextDir', () => {
expect(fs.readdirSync(ROOT_DIR)).toHaveLength(1)
expect(fs.existsSync(tempDirPath)).toBeTruthy()
})
})
})
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getUniqueWalletSetupFunctions } from "../../src"
import { afterAll, describe, expect, it, vi } from 'vitest'
import { getUniqueWalletSetupFunctions } from '../../src'

vi.mock('../../src/utils/getWalletSetupFiles', async () => {
return {
Expand Down
2 changes: 1 addition & 1 deletion packages/cache/test/utils/getWalletSetupFiles.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ describe('getWalletSetupFiles', () => {
expect(setupFiles).toContain('quack.setup.js')
expect(setupFiles).toContain('quack.setup.mjs')
})
})
})
2 changes: 1 addition & 1 deletion packages/cache/test/utils/getWalletSetupFuncHash.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { WALLET_SETUP_FUNC_HASH_LENGTH, getWalletSetupFuncHash } from '../../src'
import { describe, expect, it } from 'vitest'
import { WALLET_SETUP_FUNC_HASH_LENGTH, getWalletSetupFuncHash } from '../../src'

const EXPECTED_HASH = 'b940c886be3c1a041ddd'

Expand Down
2 changes: 1 addition & 1 deletion packages/cache/test/utils/importWalletSetupFile.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { importWalletSetupFile } from "../../src"
import { afterAll, describe, expect, it, vi } from 'vitest'
import { importWalletSetupFile } from '../../src'

vi.mock('../../src/ensureCacheDirExists', async () => {
return {
Expand Down
2 changes: 1 addition & 1 deletion packages/cache/test/utils/isDirEmpty.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ describe('isDirEmpty', () => {
const isEmpty = await isDirEmpty(ROOT_DIR)
expect(isEmpty).toEqual(false)
})
})
})
2 changes: 1 addition & 1 deletion packages/cache/test/utils/removeTempContextDir.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { removeTempContextDir } from "../../src"
import { afterAll, describe, expect, it, vi } from 'vitest'
import { removeTempContextDir } from '../../src'

const PATH = 'Happy Quack Path'
const MAX_RETRIES = 10
Expand Down
2 changes: 1 addition & 1 deletion packages/cache/test/utils/triggerCacheCreation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,4 +185,4 @@ describe('triggerCacheCreation', () => {
expectCreateCacheForWalletSetupFunction(3, setupFunctions, 'hash3')
})
})
})
})
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { waitForExtensionOnLoadPage } from '../../src/utils/waitForExtensionOnLoadPage'
import { errors as playwrightErrors } from 'playwright-core'
import { afterAll, afterEach, describe, expect, it, vi } from 'vitest'
import { waitForExtensionOnLoadPage } from '../../src/utils/waitForExtensionOnLoadPage'

const createContext = vi.fn().mockReturnValue({
waitForEvent: vi.fn().mockResolvedValue(undefined)
Expand Down

0 comments on commit c48386b

Please sign in to comment.