Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
81bd8bfb13 | |||
dd4037677d |
@ -1,5 +1,11 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2025-04-29 - 2.1.2 - fix(ts/index.ts)
|
||||||
|
Remove deprecated expectAsync function and advise using .resolves/.rejects on expect for async assertions
|
||||||
|
|
||||||
|
- Deleted the redundant expectAsync export in ts/index.ts
|
||||||
|
- Users should now call expect(...).resolves or expect(...).rejects for asynchronous assertions
|
||||||
|
|
||||||
## 2025-04-29 - 2.1.1 - fix(Assertion)
|
## 2025-04-29 - 2.1.1 - fix(Assertion)
|
||||||
Improve chainability by fixing return types in assertion methods
|
Improve chainability by fixing return types in assertion methods
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@push.rocks/smartexpect",
|
"name": "@push.rocks/smartexpect",
|
||||||
"version": "2.1.1",
|
"version": "2.1.2",
|
||||||
"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",
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@push.rocks/smartexpect',
|
name: '@push.rocks/smartexpect',
|
||||||
version: '2.1.1',
|
version: '2.1.2',
|
||||||
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.'
|
||||||
}
|
}
|
||||||
|
15
ts/index.ts
15
ts/index.ts
@ -38,18 +38,3 @@ export namespace expect {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated Use `expect(...)` with `.resolves` or `.rejects` instead.
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* @deprecated Use `expect(...)` with `.resolves` or `.rejects` instead.
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* @deprecated Use `expect(...)` with `.resolves` or `.rejects` instead.
|
|
||||||
*/
|
|
||||||
export const expectAsync = (baseArg: any) => {
|
|
||||||
// eslint-disable-next-line no-console
|
|
||||||
console.warn('[DEPRECATED] expectAsync() is deprecated. Use expect(...).resolves / .rejects');
|
|
||||||
return new Assertion<any>(baseArg, 'async');
|
|
||||||
};
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user