@angular-package/testing
Version:
Jasmine unit testing wrapper with additional custom testing features.
1 lines • 4.39 kB
JavaScript
import{Expect}from"../expect.class";export class TestingExpectToBeInstanceOf extends Expect{expectationFailOutput="The expected value should";array(t,e=!0,n=`${this.expectationFailOutput} ${!0===this.getNot()?"not":""} be an instance of \`Array\``){return!1===e&&this.not,this.expect(t,n).toBeInstanceOf(Array),this.setNot(!1),this}boolean(t,e=!0,n=`${this.expectationFailOutput} ${!0===this.getNot()?"not":""} be an instance of \`Boolean\``){return!1===e&&this.not,this.expect(t,n).toBeInstanceOf(Boolean),this.setNot(!1),this}dataView(t,e=!0,n=`${this.expectationFailOutput} ${!0===this.getNot()?"not":""} be an instance of \`DataView\``){return!1===e&&this.not,this.expect(t,n).toBeInstanceOf(DataView),this.setNot(!1),this}date(t,e=!0,n=`${this.expectationFailOutput} ${!0===this.getNot()?"not":""} be an instance of \`Date\``){return!1===e&&this.not,this.expect(t,n).toBeInstanceOf(Date),this.setNot(!1),this}error(t,e=!0,n=`${this.expectationFailOutput} ${!0===this.getNot()?"not":""} be an instance of \`Error\``){return!1===e&&this.not,this.expect(t,n).toBeInstanceOf(Error),this.setNot(!1),this}evalError(t,e=!0,n=`${this.expectationFailOutput} ${!0===this.getNot()?"not":""} be an instance of \`EvalError\``){return!1===e&&this.not,this.expect(t,n).toBeInstanceOf(EvalError),this.setNot(!1),this}function(t,e=!0,n=`${this.expectationFailOutput} ${!0===this.getNot()?"not":""} be an instance of \`Function\``){return!1===e&&this.not,this.expect(t,n).toBeInstanceOf(Function),this.setNot(!1),this}map(t,e=!0,n=`${this.expectationFailOutput} ${!0===this.getNot()?"not":""} be an instance of \`Map\``){return!1===e&&this.not,this.expect(t,n).toBeInstanceOf(Map),this.setNot(!1),this}number(t,e=!0,n=`${this.expectationFailOutput} ${!0===this.getNot()?"not":""} be an instance of a \`Number\``){return!1===e&&this.not,this.expect(t,n).toBeInstanceOf(Number),this.setNot(!1),this}object(t,e=!0,n=`${this.expectationFailOutput} ${!0===this.getNot()?"not":""} be an instance of \`Object\``){return!1===e&&this.not,this.expect(t,n).toBeInstanceOf(Object),this.setNot(!1),this}promise(t,e=!0,n=`${this.expectationFailOutput} ${!0===this.getNot()?"not":""} be an instance of \`Promise\``){return!1===e&&this.not,this.expect(t,n).toBeInstanceOf(Promise),this.setNot(!1),this}rangeError(t,e=!0,n=`${this.expectationFailOutput} ${!0===this.getNot()?"not":""} be an instance of \`RangeError\``){return!1===e&&this.not,this.expect(t,n).toBeInstanceOf(RangeError),this.setNot(!1),this}referenceError(t,e=!0,n=`${this.expectationFailOutput} ${!0===this.getNot()?"not":""} be an instance of \`ReferenceError\``){return!1===e&&this.not,this.expect(t,n).toBeInstanceOf(ReferenceError),this.setNot(!1),this}regexp(t,e=!0,n=`${this.expectationFailOutput} ${!0===this.getNot()?"not":""} be an instance of \`RegExp\``){return!1===e&&this.not,this.expect(t,n).toBeInstanceOf(RegExp),this.setNot(!1),this}set(t,e=!0,n=`${this.expectationFailOutput} ${!0===this.getNot()?"not":""} be an instance of \`Set\``){return!1===e&&this.not,this.expect(t,n).toBeInstanceOf(Set),this.setNot(!1),this}syntaxError(t,e=!0,n=`${this.expectationFailOutput} ${!0===this.getNot()?"not":""} be an instance of \`SyntaxError\``){return!1===e&&this.not,this.expect(t,n).toBeInstanceOf(SyntaxError),this.setNot(!1),this}string(t,e=!0,n=`${this.expectationFailOutput} ${!0===this.getNot()?"not":""} be an instance of a \`String\``){return!1===e&&this.not,this.expect(t,n).toBeInstanceOf(String),this.setNot(!1),this}storage(t,e=!0,n=`${this.expectationFailOutput} ${!0===this.getNot()?"not":""} be an instance of \`Storage\``){return this}typeError(t,e=!0,n=`${this.expectationFailOutput} ${!0===this.getNot()?"not":""} be an instance of \`TypeError\``){return!1===e&&this.not,this.expect(t,n).toBeInstanceOf(TypeError),this.setNot(!1),this}URIError(t,e=!0,n=`${this.expectationFailOutput} ${!0===this.getNot()?"not":""} be an instance of \`URIError\``){return!1===e&&this.not,this.expect(t,n).toBeInstanceOf(URIError),this.setNot(!1),this}weakMap(t,e=!0,n=`${this.expectationFailOutput} ${!0===this.getNot()?"not":""} be an instance of \`WeakMap\``){return!1===e&&this.not,this.expect(t,n).toBeInstanceOf(WeakMap),this.setNot(!1),this}weakSet(t,e=!0,n=`${this.expectationFailOutput} ${!0===this.getNot()?"not":""} be an instance of \`WeakSet\``){return!1===e&&this.not,this.expect(t,n).toBeInstanceOf(WeakSet),this.setNot(!1),this}}