UNPKG

@angular-package/testing

Version:

Jasmine unit testing wrapper with additional custom testing features.

65 lines (64 loc) 6.66 kB
import { Constructor } from '@angular-package/type'; import { Expect } from '../expect.class'; import { TestingExpect } from '../testing-expect.class'; import { TestingExpectToBeArrayOf } from './testing-expect-to-be-arrayof.class'; import { TestingExpectToBeInstanceOf } from './testing-expect-to-be-instanceof.class'; import { ExpectType } from '../../type'; export declare class TestingExpectToBe extends Expect { get arrayof(): TestingExpectToBeArrayOf; get instanceof(): TestingExpectToBeInstanceOf; private toBeArrayOf; private toBeInstanceOf; private expectationFailOutput; constructor(expect?: TestingExpect); array<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; be<T>(actual: ExpectType<T>, expected: jasmine.Expected<typeof actual>, expectationFailOutput?: any): this; bigint<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; boolean<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; booleanType<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; class<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; closeTo<T extends number>(actual: ExpectType<T>, expected: number, precision?: any, expectationFailOutput?: any): this; date<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; defined<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; false<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; falsy<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; function<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; greaterThan<T extends number>(actual: ExpectType<T>, expected: number, expectationFailOutput?: any): this; greaterThanOrEqual<T extends number>(actual: ExpectType<T>, expected: number, expectationFailOutput?: any): this; instance<T, Type>(actual: ExpectType<T>, constructor: Constructor<Type>, expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; instanceOf<T>(actual: ExpectType<T>, expected: jasmine.Constructor, expectationFailOutput?: any): this; key<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; lessThan<T extends number>(actual: ExpectType<T>, expected: number, expectationFailOutput?: any): this; lessThanOrEqual<T extends number>(actual: ExpectType<T>, expected: number, expectationFailOutput?: any): this; naN<T extends number>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; negativeInfinity<T extends number>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; null<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; number<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; numberBetween<T, Min extends number, Max extends number>(actual: ExpectType<T>, min: Min, max: Max, expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; numberType<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; object<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; objectKey<T>(actual: ExpectType<T>, key: PropertyKey, expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; objectKeyIn<T>(actual: ExpectType<T>, key: PropertyKey, expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; objectKeys<T>(actual: ExpectType<T>, keys: PropertyKey[], expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; objectKeysIn<T>(actual: ExpectType<T>, keys: PropertyKey[], expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; objectSomeKeys<T>(actual: ExpectType<T>, keys: (PropertyKey | PropertyKey[])[], expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; pending<T>(actual: T | PromiseLike<T>, expectationFailOutput?: any): this; positiveInfinity<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; regexp<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; rejected<T>(actual: T | PromiseLike<T>, expectationFailOutput?: any): this; rejectedWith<T, U>(actual: T | PromiseLike<T>, expected: jasmine.Expected<U>, expectationFailOutput?: any): this; rejectedWithError<T, U>(actual: T | PromiseLike<T>, expected?: new (...args: any[]) => Error, message?: string | RegExp, expectationFailOutput?: any): this; resolved<T>(actual: T | PromiseLike<T>, expectationFailOutput?: any): this; resolvedTo<T>(actual: T | PromiseLike<T>, expected: jasmine.Expected<T>, expectationFailOutput?: any): this; string<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; stringIncludes<T>(actual: ExpectType<T>, includes: string[], expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; stringIncludesSome<T>(actual: ExpectType<T>, includes: string[], expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; stringOfLength<T, Length extends number>(actual: ExpectType<T>, length: Length, expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; stringOfLengthBetween<T, Min extends number, Max extends number>(actual: ExpectType<T>, min: Min, max: Max, expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; stringType<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; symbol<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; true<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; truthy<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; typeOf<T>(actual: ExpectType<T>, expected: jasmine.Expected<string>, expectationFailOutput?: any): this; undefined<T>(actual: ExpectType<T>, expected?: jasmine.Expected<boolean>, expectationFailOutput?: any): this; }