UNPKG

@angular-package/testing

Version:

Jasmine unit testing wrapper with additional custom testing features.

1 lines 819 B
import{Expect}from"../expect.class";import{TestingExpect}from"../testing-expect.class";import{TestingExpectToBe}from"./testing-expect-to-be.class";import{TestingExpectToHave}from"./testing-expect-to-have.class";import{TestingExpectToThrow}from"./testing-expect-to-throw.class";export class TestingExpectTo extends Expect{get be(){return this.toBe}get have(){return this.toHave}get throw(){return this.toThrow}toBe;toHave;toThrow;constructor(t=new TestingExpect){super(t),this.toBe=new TestingExpectToBe(t),this.toHave=new TestingExpectToHave(t),this.toThrow=new TestingExpectToThrow(t)}contain(t,e,o){return this.expectation(t,(t=>t.toContain(e)),o).setNot(!1),this}equal(t,e,o){return this.expectation(t,(t=>t.toEqual(e)),o).setNot(!1),this}match(t,e,o){return this.expectation(t,(t=>t.toMatch(e)),o).setNot(!1),this}}