Skip to content

Commit

Permalink
fix: file not found issue fixed for build tools and newsroom video sc…
Browse files Browse the repository at this point in the history
…ript (#3422)

Co-authored-by: Akshat Nema <[email protected]>
  • Loading branch information
vishvamsinh28 and akshatnema authored Nov 22, 2024
1 parent 4c5f284 commit 1c45062
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/build-newsroom-videos.test.js
Original file line number Diff line number Diff line change
@@ -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');
Expand All @@ -13,6 +13,7 @@ describe('buildNewsroomVideos', () => {

beforeAll(() => {
mkdirpSync(testDir);
outputFileSync(testFilePath, JSON.stringify({}));
process.env.YOUTUBE_TOKEN = 'testkey';
});

Expand Down
3 changes: 3 additions & 0 deletions tests/build-tools.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down

0 comments on commit 1c45062

Please sign in to comment.