28 lines
566 B
TypeScript
28 lines
566 B
TypeScript
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();
|
|
}
|
|
} |