fix(Assertion): Refactor methods for setting failure and success messages
This commit is contained in:
parent
4e9a7b5424
commit
689afcbd92
@ -1,5 +1,11 @@
|
|||||||
# Changelog
|
# 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)
|
## 2024-08-24 - 1.2.0 - feat(assertions)
|
||||||
Add custom fail and success messages for assertions
|
Add custom fail and success messages for assertions
|
||||||
|
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@push.rocks/smartexpect',
|
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.'
|
description: 'A testing library to manage expectations in code, offering both synchronous and asynchronous assertion methods.'
|
||||||
}
|
}
|
||||||
|
@ -32,13 +32,13 @@ export class Assertion {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private failMessage: string;
|
private failMessage: string;
|
||||||
public withFailMessage(failMessageArg: string) {
|
public setFailMessage(failMessageArg: string) {
|
||||||
this.failMessage = failMessageArg;
|
this.failMessage = failMessageArg;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
private successMessage: string;
|
private successMessage: string;
|
||||||
public withSuccessMessage(successMessageArg: string) {
|
public setSuccessMessage(successMessageArg: string) {
|
||||||
this.successMessage = successMessageArg;
|
this.successMessage = successMessageArg;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user