mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
Update to TypeScript 3.7 (#3275)
and update to prettier 1.19 Also, update `assert()` and remove not null assertions where possibly in `cli`. Closes #3273
This commit is contained in:
parent
279191ad94
commit
9837d324a7
80 changed files with 980 additions and 1153 deletions
|
@ -15,11 +15,9 @@ test(async function ensureDirIfItNotExist(): Promise<void> {
|
|||
|
||||
await assertThrowsAsync(
|
||||
async (): Promise<void> => {
|
||||
await Deno.stat(testDir).then(
|
||||
(): void => {
|
||||
throw new Error("test dir should exists.");
|
||||
}
|
||||
);
|
||||
await Deno.stat(testDir).then((): void => {
|
||||
throw new Error("test dir should exists.");
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -48,11 +46,9 @@ test(async function ensureDirIfItExist(): Promise<void> {
|
|||
|
||||
await assertThrowsAsync(
|
||||
async (): Promise<void> => {
|
||||
await Deno.stat(testDir).then(
|
||||
(): void => {
|
||||
throw new Error("test dir should still exists.");
|
||||
}
|
||||
);
|
||||
await Deno.stat(testDir).then((): void => {
|
||||
throw new Error("test dir should still exists.");
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -68,12 +64,10 @@ test(function ensureDirSyncIfItExist(): void {
|
|||
|
||||
ensureDirSync(testDir);
|
||||
|
||||
assertThrows(
|
||||
(): void => {
|
||||
Deno.statSync(testDir);
|
||||
throw new Error("test dir should still exists.");
|
||||
}
|
||||
);
|
||||
assertThrows((): void => {
|
||||
Deno.statSync(testDir);
|
||||
throw new Error("test dir should still exists.");
|
||||
});
|
||||
|
||||
Deno.removeSync(baseDir, { recursive: true });
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue