@angular-package/testing
Version:
Jasmine unit testing wrapper with additional custom testing features.
1 lines • 514 B
JavaScript
import{is}from"@angular-package/type";import{TestingCounter}from"./testing-counter.abstract";export class TestingExecutable extends TestingCounter{get allowed(){return this.#e}get executable(){return this.#t}#e=!1;#t=new Set;constructor(e,t,l=[!0,!1]){super(..."boolean"==typeof l?[l,l]:l),this.#e=is.boolean(e)?e:this.#e,is.defined(t)&&(this.#t=new Set(Array.isArray(t)?t:[t]))}allow(){return this.#e=!0,this}disallow(){return this.#e=!1,this}isExecutable(e){return this.#t.has(is.number(e)?e:this.getCounter())}}