1
0
Fork 0

replacing writeFile with writeFileSync

pull/1712/head
Vallie Joseph 2024-04-15 16:57:28 +00:00
parent 234761dc05
commit 918b468a41
1 changed files with 3 additions and 4 deletions

View File

@ -10,7 +10,6 @@ import {noopLogs} from './common'
import {FilesNotFoundError} from '../src/internal/shared/errors' import {FilesNotFoundError} from '../src/internal/shared/errors'
import {BlockBlobClient} from '@azure/storage-blob' import {BlockBlobClient} from '@azure/storage-blob'
import * as fs from 'fs' import * as fs from 'fs'
import {writeFileSync} from 'fs/promises'
import * as path from 'path' import * as path from 'path'
describe('upload-artifact', () => { describe('upload-artifact', () => {
@ -363,10 +362,10 @@ describe('upload-artifact', () => {
fs.mkdirSync(dirPath, {recursive: true}) fs.mkdirSync(dirPath, {recursive: true})
} }
writeFileSync(path.join(dirPath, 'file1.txt'), 'test file content') fs.writeFileSync(path.join(dirPath, 'file1.txt'), 'test file content')
writeFileSync(path.join(dirPath, 'file2.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 jest
.spyOn(uploadZipSpecification, 'validateRootDirectory') .spyOn(uploadZipSpecification, 'validateRootDirectory')