diff --git a/changelog.md b/changelog.md index d177ee9..189638e 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,10 @@ # Changelog +## 2024-12-30 - 1.4.0 - feat(Assertion) +Add log method to Assertion class + +- Introduced a log method in the Assertion class to output assertion context. + ## 2024-12-30 - 1.3.0 - feat(Assertion) Refactor Assertion class for better error handling and code clarity diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index ec20421..1474316 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.3.0', + version: '1.4.0', 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 f9542ef..967e74f 100644 --- a/ts/smartexpect.classes.assertion.ts +++ b/ts/smartexpect.classes.assertion.ts @@ -675,4 +675,10 @@ export class Assertion { this.propertyDrillDown.push(indexArg); return this; } + + public log() { + console.log(`this is the object to test:`); + console.log(JSON.stringify(this.getObjectToTestReference(), null, 2)); + return this; + } } \ No newline at end of file