File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ const { join } = require('path')
44const zisi = require ( '@netlify/zip-it-and-ship-it' )
55const test = require ( 'ava' )
66const express = require ( 'express' )
7+ const mock = require ( 'mock-fs' )
78const mockRequire = require ( 'mock-require' )
89const sinon = require ( 'sinon' )
910const request = require ( 'supertest' )
@@ -17,6 +18,9 @@ const functionsPath = `functions`
1718/** @type { express.Express } */
1819let app
1920
21+ // mock the file-system to not write on the real one with `mkdir` inside the registry.js
22+ mock ( { node_modules : mock . load ( join ( __dirname , '../../../node_modules' ) ) } )
23+
2024test . before ( async ( t ) => {
2125 const mainFile = join ( projectRoot , functionsPath , 'hello.js' )
2226 t . context . zisiStub = sinon . stub ( zisi , 'listFunctions' ) . returns (
You can’t perform that action at this time.
0 commit comments