summaryrefslogtreecommitdiff
path: root/fs/ensure_dir_test.ts
diff options
context:
space:
mode:
authorAxetroy <axetroy.dev@gmail.com>2019-09-12 11:31:23 +0800
committerRyan Dahl <ry@tinyclouds.org>2019-09-11 23:31:23 -0400
commit878a9a29e77bcaedd4242618ccf57d1be7dfd7d8 (patch)
tree53fd448fa9cf0295c2498f4f7970f1a720435dcc /fs/ensure_dir_test.ts
parent08087e921ede553d1eaeb682d264c3d4c217a3cd (diff)
bump prettier to 1.18.2 (denoland/deno_std#592)
Original: https://github.com/denoland/deno_std/commit/06958a4ada960665a48ac34f919423e0d8d16951
Diffstat (limited to 'fs/ensure_dir_test.ts')
-rw-r--r--fs/ensure_dir_test.ts26
1 files changed, 10 insertions, 16 deletions
diff --git a/fs/ensure_dir_test.ts b/fs/ensure_dir_test.ts
index ad34336dc..affffdbe6 100644
--- a/fs/ensure_dir_test.ts
+++ b/fs/ensure_dir_test.ts
@@ -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 });
});