Compare commits

..

2 Commits

Author SHA1 Message Date
6cab20c36d 1.2.1 2024-08-24 01:42:18 +02:00
689afcbd92 fix(Assertion): Refactor methods for setting failure and success messages 2024-08-24 01:42:17 +02:00
4 changed files with 10 additions and 4 deletions

View File

@ -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

View File

@ -1,6 +1,6 @@
{ {
"name": "@push.rocks/smartexpect", "name": "@push.rocks/smartexpect",
"version": "1.2.0", "version": "1.2.1",
"private": false, "private": false,
"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.",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",

View File

@ -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.'
} }

View File

@ -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;
} }