From 918b468a41650cc298f7917e7e474caf54b7890e Mon Sep 17 00:00:00 2001 From: Vallie Joseph Date: Mon, 15 Apr 2024 16:57:28 +0000 Subject: [PATCH] replacing writeFile with writeFileSync --- packages/artifact/__tests__/upload-artifact.test.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/artifact/__tests__/upload-artifact.test.ts b/packages/artifact/__tests__/upload-artifact.test.ts index a9f4e233..1761fa01 100644 --- a/packages/artifact/__tests__/upload-artifact.test.ts +++ b/packages/artifact/__tests__/upload-artifact.test.ts @@ -10,7 +10,6 @@ import {noopLogs} from './common' import {FilesNotFoundError} from '../src/internal/shared/errors' import {BlockBlobClient} from '@azure/storage-blob' import * as fs from 'fs' -import {writeFileSync} from 'fs/promises' import * as path from 'path' describe('upload-artifact', () => { @@ -363,10 +362,10 @@ describe('upload-artifact', () => { fs.mkdirSync(dirPath, {recursive: true}) } - writeFileSync(path.join(dirPath, 'file1.txt'), 'test file content') - writeFileSync(path.join(dirPath, 'file2.txt'), 'test file content') + fs.writeFileSync(path.join(dirPath, 'file1.txt'), 'test file content') + fs.writeFileSync(path.join(dirPath, 'file2.txt'), 'test file content') - writeFileSync(path.join(dirPath, 'file3.txt'), 'test file content') + fs.writeFileSync(path.join(dirPath, 'file3.txt'), 'test file content') jest .spyOn(uploadZipSpecification, 'validateRootDirectory')