Skip to content

Commit

Permalink
need some mocking
Browse files Browse the repository at this point in the history
  • Loading branch information
sfoster1 committed Oct 17, 2024
1 parent 1f2c373 commit 7d764f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { when } from 'vitest-when'

import { getVersionFromZipIfValid as _getVersionFromZipIfValid } from '../scan-zip'
import { getLatestMassStorageUpdateFile } from '../scan-device'

vi.mock('../../../log')
vi.mock('../scan-zip')
const getVersionFromZipIfValid = vi.mocked(_getVersionFromZipIfValid)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { it, describe, expect } from 'vitest'
import { it, describe, expect, vi } from 'vitest'
import path from 'path'
import { exec as _exec } from 'child_process'
import { promisify } from 'util'
Expand All @@ -7,6 +7,7 @@ import { REASONABLE_VERSION_FILE_SIZE_B } from '../../constants'
import { directoryWithCleanup } from '../../utils'
import { getVersionFromZipIfValid } from '../scan-zip'

vi.mock('../../../log')
const exec = promisify(_exec)

const zipCommand = (
Expand Down

0 comments on commit 7d764f8

Please sign in to comment.