object Assert extends Object with Assert
Assert Singleton
- Annotations
- @native() @JSImport("assert", JSImport.Namespace)
- Alphabetic
- By Inheritance
- Assert
- Assert
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply(expression: Any): Unit
- Definition Classes
- Assert
- def apply(expression: Any, message: String): Unit
An alias of assert.ok() .
An alias of assert.ok() .
- expression
the expression to evaluate
- Definition Classes
- Assert
assert(value[, message])
Example: - final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def deepStrictEqual(actual: Any, expected: Any): Unit
- Definition Classes
- Assert
- def deepStrictEqual(actual: Any, expected: Any, message: String): Unit
Generally identical to assert.deepEqual() with two exceptions.
Generally identical to assert.deepEqual() with two exceptions. First, primitive values are compared using the strict equality operator ( === ). Second, object comparisons include a strict equality check of their prototypes.
- Definition Classes
- Assert
assert.deepStrictEqual(actual, expected[, message])
Example: - def doesNotReject(asyncFn: Promise[_]): Unit
- Definition Classes
- Assert
- def doesNotReject(asyncFn: Promise[_], message: String): Unit
- Definition Classes
- Assert
- def doesNotReject(asyncFn: Promise[_], error: Function): Unit
- Definition Classes
- Assert
- def doesNotReject(asyncFn: Promise[_], error: Function, message: String): Unit
- Definition Classes
- Assert
- def doesNotReject(asyncFn: Promise[_], error: RegExp): Unit
- Definition Classes
- Assert
- def doesNotReject(asyncFn: Promise[_], error: RegExp, message: String): Unit
- Definition Classes
- Assert
- def doesNotReject(asyncFn: Function): Unit
- Definition Classes
- Assert
- def doesNotReject(asyncFn: Function, message: String): Unit
- Definition Classes
- Assert
- def doesNotReject(asyncFn: Function, error: Function): Unit
- Definition Classes
- Assert
- def doesNotReject(asyncFn: Function, error: Function, message: String): Unit
- Definition Classes
- Assert
- def doesNotReject(asyncFn: Function, error: RegExp): Unit
- Definition Classes
- Assert
- def doesNotReject(asyncFn: Function, error: RegExp, message: String): Unit
- Definition Classes
- Assert
- def doesNotThrow(block: Function): Unit
- Definition Classes
- Assert
- def doesNotThrow(block: Function, message: String): Unit
- Definition Classes
- Assert
- def doesNotThrow(block: Function, error: Function): Unit
- Definition Classes
- Assert
- def doesNotThrow(block: Function, error: Function, message: String): Unit
- Definition Classes
- Assert
- def doesNotThrow(block: Function, error: RegExp): Unit
- Definition Classes
- Assert
- def doesNotThrow(block: Function, error: RegExp, message: String): Unit
Asserts that the function block does not throw an error.
Asserts that the function block does not throw an error. See assert.throws() for more details. When assert.doesNotThrow() is called, it will immediately call the block function. If an error is thrown and it is the same type as that specified by the error parameter, then an AssertionError is thrown. If the error is of a different type, or if the error parameter is undefined, the error is propagated back to the caller.
- Definition Classes
- Assert
assert.doesNotThrow(block[, error][, message])
Example: - final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def fail(message: scala.scalajs.js.Error): Unit
- Definition Classes
- Assert
- See also
https://nodejs.org/api/assert.html#assert_assert_fail_message
- def fail(message: String): Unit
- Definition Classes
- Assert
- See also
https://nodejs.org/api/assert.html#assert_assert_fail_message
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hasOwnProperty(v: String): Boolean
- Definition Classes
- Object
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def ifError(value: Any): Unit
Throws value if value is truthy.
Throws value if value is truthy. This is useful when testing the error argument in callbacks.
- Definition Classes
- Assert
assert.ifError(value)
Example: - final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def notDeepStrictEqual(actual: Any, expected: Any): Unit
- Definition Classes
- Assert
- def notDeepStrictEqual(actual: Any, expected: Any, message: String): Unit
Tests for deep strict inequality.
Tests for deep strict inequality. Opposite of assert.deepStrictEqual().
- Definition Classes
- Assert
assert.notDeepStrictEqual(actual, expected[, message])
Example: - def notStrictEqual(actual: Any, expected: Any): Unit
- Definition Classes
- Assert
- def notStrictEqual(actual: Any, expected: Any, message: String): Unit
Tests strict inequality as determined by the strict not equal operator ( !== ).
Tests strict inequality as determined by the strict not equal operator ( !== ).
- Definition Classes
- Assert
assert.notStrictEqual(actual, expected[, message])
Example: - final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def ok(value: Any): Unit
- Definition Classes
- Assert
- def ok(value: Any, message: String): Unit
Tests if value is truthy.
Tests if value is truthy. It is equivalent to assert.equal(!!value, true, message). If value is not truthy, an AssertionError is thrown with a message property set equal to the value of the message parameter. If the message parameter is undefined, a default error message is assigned.
- Definition Classes
- Assert
- def propertyIsEnumerable(v: String): Boolean
- Definition Classes
- Object
- def rejects(asyncFn: Promise[_]): Unit
- Definition Classes
- Assert
- def rejects(asyncFn: Promise[_], message: String): Unit
- Definition Classes
- Assert
- def rejects(asyncFn: Promise[_], error: Object): Unit
- Definition Classes
- Assert
- def rejects(asyncFn: Promise[_], error: Object, message: String): Unit
- Definition Classes
- Assert
- def rejects(asyncFn: Function): Unit
- Definition Classes
- Assert
- def rejects(asyncFn: Function, message: String): Unit
- Definition Classes
- Assert
- def rejects(asyncFn: Function, error: Object): Unit
- Definition Classes
- Assert
- def rejects(asyncFn: Function, error: Object, message: String): Unit
- Definition Classes
- Assert
- val strict: Assert
- def strictEqual(actual: Any, expected: Any): Unit
- Definition Classes
- Assert
- def strictEqual(actual: Any, expected: Any, message: String): Unit
Tests strict equality as determined by the strict equality operator ( === ).
Tests strict equality as determined by the strict equality operator ( === ).
- Definition Classes
- Assert
assert.strictEqual(actual, expected[, message])
Example: - final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def throws(block: Function, error: Object): Unit
- Definition Classes
- Assert
- def throws(block: Function, error: Object, message: String): Unit
If the values are not strictly equal, an AssertionError is thrown with a message property set equal to the value of the message parameter.
If the values are not strictly equal, an AssertionError is thrown with a message property set equal to the value of the message parameter. If the message parameter is undefined, a default error message is assigned.
- Definition Classes
- Assert
assert.throws(block[, error][, message])
Example: - def toLocaleString(): String
- Definition Classes
- Object
- def toString(): String
- Definition Classes
- AnyRef → Any
- def valueOf(): Any
- Definition Classes
- Object
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()