diff --git a/tests/build-newsroom-videos.test.js b/tests/build-newsroom-videos.test.js index 494f91f27341..188bc2dffc70 100644 --- a/tests/build-newsroom-videos.test.js +++ b/tests/build-newsroom-videos.test.js @@ -1,4 +1,4 @@ -const { readFileSync, removeSync, mkdirpSync } = require('fs-extra'); +const { readFileSync, removeSync, mkdirpSync, outputFileSync } = require('fs-extra'); const { resolve, join } = require('path'); const { buildNewsroomVideos } = require('../scripts/build-newsroom-videos'); const { mockApiResponse, expectedResult } = require('./fixtures/newsroomData'); @@ -13,6 +13,7 @@ describe('buildNewsroomVideos', () => { beforeAll(() => { mkdirpSync(testDir); + outputFileSync(testFilePath, JSON.stringify({})); process.env.YOUTUBE_TOKEN = 'testkey'; }); diff --git a/tests/build-tools.test.js b/tests/build-tools.test.js index 74524ddb9775..6cb391d93deb 100644 --- a/tests/build-tools.test.js +++ b/tests/build-tools.test.js @@ -37,6 +37,9 @@ describe('buildTools', () => { consoleErrorMock = jest.spyOn(console, 'error').mockImplementation(() => {}); fs.ensureDirSync(testDir); fs.outputFileSync(manualToolsPath, JSON.stringify(manualTools)); + fs.outputFileSync(automatedToolsPath, JSON.stringify({})); + fs.outputFileSync(toolsPath, JSON.stringify({})); + fs.outputFileSync(tagsPath, JSON.stringify({})); }); afterAll(() => {