BREAKING CHANGE(docs): Update documentation and examples to unify async and sync assertions, add custom matcher guides, and update package configuration
This commit is contained in:
28
ts/namespaces/type.ts
Normal file
28
ts/namespaces/type.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { Assertion } from '../smartexpect.classes.assertion.js';
|
||||
|
||||
/**
|
||||
* Namespace for type-based matchers
|
||||
*/
|
||||
export class TypeMatchers {
|
||||
constructor(private assertion: Assertion<any>) {}
|
||||
|
||||
toBeTypeofString() {
|
||||
return this.assertion.toBeTypeofString();
|
||||
}
|
||||
|
||||
toBeTypeofNumber() {
|
||||
return this.assertion.toBeTypeofNumber();
|
||||
}
|
||||
|
||||
toBeTypeofBoolean() {
|
||||
return this.assertion.toBeTypeofBoolean();
|
||||
}
|
||||
|
||||
toBeTypeOf(typeName: string) {
|
||||
return this.assertion.toBeTypeOf(typeName);
|
||||
}
|
||||
|
||||
toBeDefined() {
|
||||
return this.assertion.toBeDefined();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user