Packages

object Assert extends Object with Assert

Assert Singleton

Annotations
@native() @JSImport("assert", JSImport.Namespace)
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Assert
  2. Assert
  3. Object
  4. Any
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def apply(expression: Any): Unit
    Definition Classes
    Assert
  5. 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
    Example:
    1. assert(value[, message])

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  8. def deepStrictEqual(actual: Any, expected: Any): Unit
    Definition Classes
    Assert
  9. 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
    Example:
    1. assert.deepStrictEqual(actual, expected[, message])

  10. def doesNotReject(asyncFn: Promise[_]): Unit
    Definition Classes
    Assert
  11. def doesNotReject(asyncFn: Promise[_], message: String): Unit
    Definition Classes
    Assert
  12. def doesNotReject(asyncFn: Promise[_], error: Function): Unit
    Definition Classes
    Assert
  13. def doesNotReject(asyncFn: Promise[_], error: Function, message: String): Unit
    Definition Classes
    Assert
  14. def doesNotReject(asyncFn: Promise[_], error: RegExp): Unit
    Definition Classes
    Assert
  15. def doesNotReject(asyncFn: Promise[_], error: RegExp, message: String): Unit
    Definition Classes
    Assert
  16. def doesNotReject(asyncFn: Function): Unit
    Definition Classes
    Assert
  17. def doesNotReject(asyncFn: Function, message: String): Unit
    Definition Classes
    Assert
  18. def doesNotReject(asyncFn: Function, error: Function): Unit
    Definition Classes
    Assert
  19. def doesNotReject(asyncFn: Function, error: Function, message: String): Unit
    Definition Classes
    Assert
  20. def doesNotReject(asyncFn: Function, error: RegExp): Unit
    Definition Classes
    Assert
  21. def doesNotReject(asyncFn: Function, error: RegExp, message: String): Unit
    Definition Classes
    Assert
  22. def doesNotThrow(block: Function): Unit
    Definition Classes
    Assert
  23. def doesNotThrow(block: Function, message: String): Unit
    Definition Classes
    Assert
  24. def doesNotThrow(block: Function, error: Function): Unit
    Definition Classes
    Assert
  25. def doesNotThrow(block: Function, error: Function, message: String): Unit
    Definition Classes
    Assert
  26. def doesNotThrow(block: Function, error: RegExp): Unit
    Definition Classes
    Assert
  27. 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
    Example:
    1. assert.doesNotThrow(block[, error][, message])

  28. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  30. def fail(message: scala.scalajs.js.Error): Unit

    Definition Classes
    Assert
    See also

    https://nodejs.org/api/assert.html#assert_assert_fail_message

  31. def fail(message: String): Unit

    Definition Classes
    Assert
    See also

    https://nodejs.org/api/assert.html#assert_assert_fail_message

  32. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  33. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  34. def hasOwnProperty(v: String): Boolean
    Definition Classes
    Object
  35. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  36. 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
    Example:
    1. assert.ifError(value)

  37. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  38. def isPrototypeOf(v: Object): Boolean
    Definition Classes
    Object
  39. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  40. def notDeepStrictEqual(actual: Any, expected: Any): Unit
    Definition Classes
    Assert
  41. 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
    Example:
    1. assert.notDeepStrictEqual(actual, expected[, message])

  42. def notStrictEqual(actual: Any, expected: Any): Unit
    Definition Classes
    Assert
  43. 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
    Example:
    1. assert.notStrictEqual(actual, expected[, message])

  44. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  45. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  46. def ok(value: Any): Unit
    Definition Classes
    Assert
  47. 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
  48. def propertyIsEnumerable(v: String): Boolean
    Definition Classes
    Object
  49. def rejects(asyncFn: Promise[_]): Unit
    Definition Classes
    Assert
  50. def rejects(asyncFn: Promise[_], message: String): Unit
    Definition Classes
    Assert
  51. def rejects(asyncFn: Promise[_], error: Object): Unit
    Definition Classes
    Assert
  52. def rejects(asyncFn: Promise[_], error: Object, message: String): Unit
    Definition Classes
    Assert
  53. def rejects(asyncFn: Function): Unit
    Definition Classes
    Assert
  54. def rejects(asyncFn: Function, message: String): Unit
    Definition Classes
    Assert
  55. def rejects(asyncFn: Function, error: Object): Unit
    Definition Classes
    Assert
  56. def rejects(asyncFn: Function, error: Object, message: String): Unit
    Definition Classes
    Assert
  57. val strict: Assert
  58. def strictEqual(actual: Any, expected: Any): Unit
    Definition Classes
    Assert
  59. 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
    Example:
    1. assert.strictEqual(actual, expected[, message])

  60. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  61. def throws(block: Function, error: Object): Unit
    Definition Classes
    Assert
  62. 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
    Example:
    1. assert.throws(block[, error][, message])

  63. def toLocaleString(): String
    Definition Classes
    Object
  64. def toString(): String
    Definition Classes
    AnyRef → Any
  65. def valueOf(): Any
    Definition Classes
    Object
  66. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  67. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  68. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Deprecated Value Members

  1. def fail(actual: Any, expected: Any, message: String, operator: String): Unit
    Definition Classes
    Assert
    Annotations
    @deprecated
    Deprecated

    (Since version Node.js v10.0.0) Use assert.fail([message]) or other assert functions instead.

Inherited from Assert

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped