Skip to content

Commit

Permalink
file not found issue fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
vishvamsinh28 committed Nov 22, 2024
1 parent 1be4431 commit 8bce4e0
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 8bce4e0

Please sign in to comment.