Node TAP
    Preparing search index...

    Variable throws

    throws: (
        fn: Function | (() => any),
        ...__namedParameters: ThrowsArgs,
    ) => boolean | Error

    Type Declaration

      • (fn: Function | (() => any), ...__namedParameters: ThrowsArgs): boolean | Error
      • Verify that the function throws an error. Thrown error is tested against the wanted param if provided, using t.match().

        Returns false on failure, or the error object thrown on success

        Parameters

        • fn: Function | (() => any)
        • ...__namedParameters: ThrowsArgs

        Returns boolean | Error