-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,11 @@ describe("AuthService", () => { | |
expect(user.statusCode).toEqual(HttpStatus.CREATED); | ||
expect(user.message).toEqual("創建成功"); | ||
}); | ||
afterEach(async () => { | ||
if (userRepository && userRepository.clear) { | ||
await userRepository.clear(); | ||
} | ||
}); | ||
it("應該會發生 email、account 已被註冊衝突", async () => { | ||
const createUserDto1: CreateUserDto = { | ||
email: "[email protected]", | ||
|
@@ -68,6 +73,11 @@ describe("AuthService", () => { | |
}); | ||
} | ||
}); | ||
afterEach(async () => { | ||
if (userRepository && userRepository.clear) { | ||
await userRepository.clear(); | ||
} | ||
}); | ||
it("應該會發生 email 已被註冊衝突", async () => { | ||
const test_data1: CreateUserDto = { | ||
email: "[email protected]", | ||
|
@@ -95,6 +105,11 @@ describe("AuthService", () => { | |
}); | ||
} | ||
}); | ||
afterEach(async () => { | ||
if (userRepository && userRepository.clear) { | ||
await userRepository.clear(); | ||
} | ||
}); | ||
it("應該會發生 account 已被註冊衝突", async () => { | ||
const test_data1: CreateUserDto = { | ||
email: "[email protected]", | ||
|