diff options
author | Veetaha <[email protected]> | 2020-02-28 22:26:22 +0000 |
---|---|---|
committer | Veetaha <[email protected]> | 2020-02-28 22:26:22 +0000 |
commit | 3ad0574d7e3f1af1e28f7f5cbc085faa30759e47 (patch) | |
tree | de0192925c1b4bcdad592401771fe4344b11a3e7 /editors/code/src/installation | |
parent | 9cf25770542dfbf35c710f7c214f65ecaad39100 (diff) |
vscode: add equality assertion
Diffstat (limited to 'editors/code/src/installation')
-rw-r--r-- | editors/code/src/installation/download_artifact.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editors/code/src/installation/download_artifact.ts b/editors/code/src/installation/download_artifact.ts index 8ed99bf0a..c60014c8c 100644 --- a/editors/code/src/installation/download_artifact.ts +++ b/editors/code/src/installation/download_artifact.ts | |||
@@ -1,10 +1,10 @@ | |||
1 | import * as vscode from "vscode"; | 1 | import * as vscode from "vscode"; |
2 | import * as path from "path"; | 2 | import * as path from "path"; |
3 | import { promises as fs } from "fs"; | 3 | import { promises as fs } from "fs"; |
4 | import { strict as assert } from "assert"; | ||
5 | 4 | ||
6 | import { ArtifactReleaseInfo } from "./interfaces"; | 5 | import { ArtifactReleaseInfo } from "./interfaces"; |
7 | import { downloadFile } from "./download_file"; | 6 | import { downloadFile } from "./download_file"; |
7 | import { assert } from "../util"; | ||
8 | 8 | ||
9 | /** | 9 | /** |
10 | * Downloads artifact from given `downloadUrl`. | 10 | * Downloads artifact from given `downloadUrl`. |
@@ -19,7 +19,7 @@ export async function downloadArtifact( | |||
19 | installationDir: string, | 19 | installationDir: string, |
20 | displayName: string, | 20 | displayName: string, |
21 | ) { | 21 | ) { |
22 | await fs.mkdir(installationDir).catch(err => assert.strictEqual( | 22 | await fs.mkdir(installationDir).catch(err => assert.eq( |
23 | err?.code, | 23 | err?.code, |
24 | "EEXIST", | 24 | "EEXIST", |
25 | `Couldn't create directory "${installationDir}" to download ` + | 25 | `Couldn't create directory "${installationDir}" to download ` + |