Skip to content

Commit 6637344

Browse files
✅(common): update test assertions to match English error messages
1 parent 4f99f27 commit 6637344

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

packages/common/tests/unit/handle-core-response.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,18 +113,18 @@ describe("handleCoreResponse", () => {
113113
expect(() => handleDBError("user")(chainedError)).toThrow("404");
114114
});
115115

116-
it('should throw "Nom exist" for duplicate name entry', () => {
116+
it('should throw "Name already exists" for duplicate name entry', () => {
117117
const chainedError = new ChainedError(
118118
"Duplicate entry abc for key name_UNIQUE"
119119
);
120-
expect(() => handleDBError("user")(chainedError)).toThrow("Nom exist");
120+
expect(() => handleDBError("user")(chainedError)).toThrow("Name already exists");
121121
});
122122

123-
it('should throw "Email exist" for duplicate email entry', () => {
123+
it('should throw "Email already exists" for duplicate email entry', () => {
124124
const chainedError = new ChainedError(
125125
"Duplicate entry abc for key email_UNIQUE"
126126
);
127-
expect(() => handleDBError("user")(chainedError)).toThrow("Email exist");
127+
expect(() => handleDBError("user")(chainedError)).toThrow("Email already exists");
128128
});
129129

130130
it("should re-throw non-ChainedError (plain Error)", () => {

0 commit comments

Comments
 (0)