1
0
Fork 0

correcting imports

pull/1712/head
Vallie Joseph 2024-04-15 16:49:47 +00:00
parent e998cf1216
commit fa1cb5d153
3 changed files with 6 additions and 41 deletions

View File

@ -10,6 +10,7 @@ import {noopLogs} from './common'
import {FilesNotFoundError} from '../src/internal/shared/errors'
import {BlockBlobClient} from '@azure/storage-blob'
import * as fs from 'fs'
import {writeFile} from 'fs/promises'
import * as path from 'path'
describe('upload-artifact', () => {
@ -361,36 +362,11 @@ describe('upload-artifact', () => {
if (!fs.existsSync(dirPath)) {
fs.mkdirSync(dirPath, {recursive: true})
}
// eslint-disable-next-line @typescript-eslint/await-thenable
await fs.writeFile(
path.join(dirPath, 'file1.txt'),
'test file content',
err => {
if (err) {
throw err
}
}
)
// eslint-disable-next-line @typescript-eslint/await-thenable
await fs.writeFile(
path.join(dirPath, 'file2.txt'),
'test file content',
err => {
if (err) {
throw err
}
}
)
// eslint-disable-next-line @typescript-eslint/await-thenable
await fs.writeFile(
path.join(dirPath, 'file3.txt'),
'test file content',
err => {
if (err) {
throw err
}
}
)
await writeFile(path.join(dirPath, 'file1.txt'), 'test file content')
await writeFile(path.join(dirPath, 'file2.txt'), 'test file content')
await writeFile(path.join(dirPath, 'file3.txt'), 'test file content')
jest
.spyOn(uploadZipSpecification, 'validateRootDirectory')

View File

@ -27,7 +27,6 @@
"devDependencies": {
"@types/archiver": "^5.3.2",
"@types/unzip-stream": "^0.3.4",
"mock-fs": "^5.2.0",
"typedoc": "^0.25.4",
"typedoc-plugin-markdown": "^3.17.1",
"typescript": "^5.2.2"
@ -1225,15 +1224,6 @@
"mkdirp": "bin/cmd.js"
}
},
"node_modules/mock-fs": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-5.2.0.tgz",
"integrity": "sha512-2dF2R6YMSZbpip1V1WHKGLNjr/k48uQClqMVb5H3MOvwc9qhYis3/IWbj02qIg/Y8MDXKFF4c5v0rxx2o6xTZw==",
"dev": true,
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/neo-async": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz",

View File

@ -60,7 +60,6 @@
"@types/unzip-stream": "^0.3.4",
"typedoc": "^0.25.4",
"typedoc-plugin-markdown": "^3.17.1",
"mock-fs": "^5.2.0",
"typescript": "^5.2.2"
}
}