UNPKG

@angular-package/testing

Version:

Jasmine unit testing wrapper with additional custom testing features.

1 lines 1.27 kB
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{TestingItToHave}from"../it";import{TextualExpectation}from"../textual-expectation.abstract";export class TestingToHave extends TestingCore{toHave;constructor(e=!0,t=!0,i,a=[!0,!1],s=new TestingDescribe(e,i?.describe,a),n=new TestingIt(t,i?.it,a),o=new TestingExpectation){super(e,t,i,a,s,n,o),this.toHave=new TestingItToHave(e,t,i,a,s,n,o)}toHaveBeenCalled(e,t,i,a){return this.toHave.been.called.called(e,t,i,a),this}toHaveBeenCalledBefore(e,t,i,a){return this.toHave.been.called.before(e,t,i,a),this}toHaveBeenCalledOnceWith(e=TextualExpectation.toHaveBeenCalledOnceWith,t,...i){return this.toHave.been.called.onceWith(e,t,...i),this}toHaveBeenCalledTimes(e,t,i,a,s){return this.toHave.been.called.times(e,t,i,a,s),this}toHaveBeenCalledWith(e=TextualExpectation.toHaveBeenCalledWith,t,...i){return this.toHave.been.called.with(e,t,...i),this}toHaveClass(e,t,i,a,s){return this.toHave.class(e,t,i,a,s),this}toHaveSize(e,t,i,a,s){return this.toHave.size(e,t,i,a,s),this}toHaveSpyInteractions(e,t,i,a){return this.toHave.spyInteractions(e,t,i,a),this}}