@angular-package/testing
Version:
Jasmine unit testing wrapper with additional custom testing features.
40 lines (39 loc) • 5.15 kB
TypeScript
import { TestingCore } from '../testing-core.abstract';
import { TestingDescribe } from '../testing-describe.class';
import { TestingExpectation } from '../testing-expectation.class';
import { TestingIt } from '../testing-it.class';
import { TestingItToBe } from '../it';
import { Constructor } from '@angular-package/type';
import { CounterConfig, ExpectType } from '../../type';
import { ExecutableTests } from '../../interface/executable-tests.interface';
export declare class TestingToBe<Descriptions extends string = string, Expectations extends string = string> extends TestingCore<Descriptions, Expectations> {
protected toBe: TestingItToBe;
constructor(allowDescribe?: boolean, allowIt?: boolean, executable?: ExecutableTests, counter?: CounterConfig, testingDescribe?: TestingDescribe, testingIt?: TestingIt, testingExpectation?: TestingExpectation);
toBeArray<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectation?: string, expectationFailOutput?: any, execute?: boolean): this;
toBeBigInt<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectation?: string, expectationFailOutput?: any, execute?: boolean): this;
toBeClass<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectation?: string, expectationFailOutput?: any, execute?: boolean): this;
toBeCloseTo<T extends number>(actual: ExpectType<T>, expected: number, precision?: any, expectation?: string, expectationFailOutput?: any, execute?: boolean): this;
toBeDate<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectation?: string, expectationFailOutput?: any, execute?: boolean): this;
toBeDefined<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectation?: string, expectationFailOutput?: any, execute?: boolean): this;
toBeFalse<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectation?: string, expectationFailOutput?: any, execute?: boolean): this;
toBeFalsy<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectation?: string, expectationFailOutput?: any, execute?: boolean): this;
toBeFunction<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectation?: string, expectationFailOutput?: any, execute?: boolean): this;
toBeInstance<T, Type>(actual: ExpectType<T>, constructor: Constructor<Type>, expected?: jasmine.Expected<boolean>, expectation?: string, expectationFailOutput?: any, execute?: boolean): this;
toBeInstanceOf<T>(actual: ExpectType<T>, expected: jasmine.Constructor, expectation?: string, expectationFailOutput?: any, execute?: boolean): this;
toBeKey<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectation?: string, expectationFailOutput?: any, execute?: boolean): this;
toBeNaN<T extends number>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectation?: string, expectationFailOutput?: any, execute?: boolean): this;
toBeNegativeInfinity<T extends number>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectation?: string, expectationFailOutput?: any, execute?: boolean): this;
toBeNull<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectation?: string, expectationFailOutput?: any, execute?: boolean): this;
toBePending<T>(actual: T | PromiseLike<T>, expectation?: string, expectationFailOutput?: any, execute?: boolean): this;
toBePositiveInfinity<T extends number>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectation?: string, expectationFailOutput?: any, execute?: boolean): this;
toBeRegExp<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectation?: string, expectationFailOutput?: any, execute?: boolean): this;
toBeRejected<T>(actual: T | PromiseLike<T>, expectation?: string, expectationFailOutput?: any, execute?: boolean): this;
toBeRejectedWith<T, U>(actual: T | PromiseLike<T>, expected: jasmine.Expected<U>, expectation?: string, expectationFailOutput?: any, execute?: boolean): this;
toBeRejectedWithError<T>(actual: T | PromiseLike<T>, expected?: new (...args: any[]) => Error, message?: string | RegExp, expectation?: string, expectationFailOutput?: any, execute?: boolean): this;
toBeResolved<T>(actual: T | PromiseLike<T>, expectation?: string, expectationFailOutput?: any, execute?: boolean): this;
toBeResolvedTo<T>(actual: T | PromiseLike<T>, expected: jasmine.Expected<T>, expectation?: string, expectationFailOutput?: any, execute?: boolean): this;
toBeSymbol<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectation?: string, expectationFailOutput?: any, execute?: boolean): this;
toBeTrue<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectation?: string, expectationFailOutput?: any, execute?: boolean): this;
toBeTruthy<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectation?: string, expectationFailOutput?: any, execute?: boolean): this;
toBeUndefined<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectation?: string, expectationFailOutput?: any, execute?: boolean): this;
}