diff --git a/changelog.md b/changelog.md index a4c2f05..cc5be7c 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,11 @@ # Changelog +## 2024-08-24 - 1.2.1 - fix(Assertion) +Refactor methods for setting failure and success messages + +- Renamed 'withFailMessage' to 'setFailMessage' for better readability and consistency. +- Renamed 'withSuccessMessage' to 'setSuccessMessage' to align with the naming convention. + ## 2024-08-24 - 1.2.0 - feat(assertions) Add custom fail and success messages for assertions diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 58eaff2..ee02f37 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@push.rocks/smartexpect', - version: '1.2.0', + version: '1.2.1', description: 'A testing library to manage expectations in code, offering both synchronous and asynchronous assertion methods.' } diff --git a/ts/smartexpect.classes.assertion.ts b/ts/smartexpect.classes.assertion.ts index 9a5a3d4..3210183 100644 --- a/ts/smartexpect.classes.assertion.ts +++ b/ts/smartexpect.classes.assertion.ts @@ -32,13 +32,13 @@ export class Assertion { } private failMessage: string; - public withFailMessage(failMessageArg: string) { + public setFailMessage(failMessageArg: string) { this.failMessage = failMessageArg; return this; } private successMessage: string; - public withSuccessMessage(successMessageArg: string) { + public setSuccessMessage(successMessageArg: string) { this.successMessage = successMessageArg; return this; }