11import { readFile } from 'fs/promises'
22import { join , resolve } from 'path'
3- import { platform , version as nodeVersion } from 'process'
4- import { promisify } from 'util'
3+ import { platform } from 'process'
54
65import { getPath as getBootstrapPath } from '@netlify/serverless-functions-api'
76import merge from 'deepmerge'
8- import glob from 'glob'
7+ import { glob } from 'glob'
98import { pathExists } from 'path-exists'
10- import semver from 'semver'
119import { dir as getTmpDir } from 'tmp-promise'
1210import { afterEach , describe , expect , test , vi } from 'vitest'
1311
@@ -18,11 +16,9 @@ import { invokeLambda, readAsBuffer } from './helpers/lambda.js'
1816import { zipFixture , unzipFiles , importFunctionFile , FIXTURES_ESM_DIR , FIXTURES_DIR } from './helpers/main.js'
1917import { testMany } from './helpers/test_many.js'
2018
21- const pGlob = promisify ( glob )
22-
2319vi . mock ( '../src/utils/shell.js' , ( ) => ( { shellUtils : { runCommand : vi . fn ( ) } } ) )
2420
25- describe . runIf ( semver . gte ( nodeVersion , '18.13.0' ) ) ( 'V2 functions API' , ( ) => {
21+ describe ( 'V2 functions API' , ( ) => {
2622 afterEach ( ( ) => {
2723 vi . resetAllMocks ( )
2824 } )
@@ -132,7 +128,7 @@ describe.runIf(semver.gte(nodeVersion, '18.13.0'))('V2 functions API', () => {
132128
133129 const [ { name : archive , entryFilename, path } ] = files
134130
135- const untranspiledFiles = await pGlob ( `${ path } /**/*.ts` )
131+ const untranspiledFiles = await glob ( `${ path } /**/*.ts` )
136132 expect ( untranspiledFiles ) . toEqual ( [ ] )
137133
138134 const func = await importFunctionFile ( `${ tmpDir } /${ archive } /${ entryFilename } ` )
0 commit comments