How to use the check-error.getConstructorName function in check-error

To help you get started, we’ve selected a few check-error examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github open-webrtc-toolkit / owt-client-javascript / test / unit / resources / scripts / deps / chai-as-promised.js View on Github external
/* eslint-disable no-unused-expressions */
            return this.rejected;
            /* eslint-enable no-unused-expressions */
        }

        if (message !== undefined) {
            utils.flag(this, "message", message);
        }

        if (errorLike instanceof RegExp || typeof errorLike === "string") {
            errMsgMatcher = errorLike;
            errorLike = null;
        } else if (errorLike && errorLike instanceof Error) {
            errorLikeName = errorLike.toString();
        } else if (typeof errorLike === "function") {
            errorLikeName = checkError.getConstructorName(errorLike);
        } else {
            errorLike = null;
        }
        const everyArgIsDefined = Boolean(errorLike && errMsgMatcher);

        let matcherRelation = "including";
        if (errMsgMatcher instanceof RegExp) {
            matcherRelation = "matching";
        }

        const derivedPromise = getBasePromise(this).then(
            value => {
                let assertionMessage = null;
                let expected = null;

                if (errorLike) {
github open-webrtc-toolkit / owt-client-javascript / test / unit / resources / scripts / deps / chai-as-promised-browserified.js View on Github external
/* eslint-disable no-unused-expressions */
            return this.rejected;
            /* eslint-enable no-unused-expressions */
        }

        if (message !== undefined) {
            utils.flag(this, "message", message);
        }

        if (errorLike instanceof RegExp || typeof errorLike === "string") {
            errMsgMatcher = errorLike;
            errorLike = null;
        } else if (errorLike && errorLike instanceof Error) {
            errorLikeName = errorLike.toString();
        } else if (typeof errorLike === "function") {
            errorLikeName = checkError.getConstructorName(errorLike);
        } else {
            errorLike = null;
        }
        const everyArgIsDefined = Boolean(errorLike && errMsgMatcher);

        let matcherRelation = "including";
        if (errMsgMatcher instanceof RegExp) {
            matcherRelation = "matching";
        }

        const derivedPromise = getBasePromise(this).then(
            value => {
                let assertionMessage = null;
                let expected = null;

                if (errorLike) {
github RxJSInAction / rxjs-in-action / app / js / helpers / chai-as-promised-bundle.js View on Github external
/* jshint expr: true */
            this.rejected;
            return;
        }

        if (message !== undefined) {
            utils.flag(this, "message", message);
        }

        if (errorLike instanceof RegExp || typeof errorLike === "string") {
            errMsgMatcher = errorLike;
            errorLike = null;
        } else if (errorLike && errorLike instanceof Error) {
            errorLikeName = errorLike.toString();
        } else if (typeof errorLike === "function") {
            errorLikeName = checkError.getConstructorName(errorLike);
        } else {
            errorLike = null;
        }
        var everyArgIsDefined = Boolean(errorLike && errMsgMatcher);

        var matcherRelation = "including";
        if (errMsgMatcher instanceof RegExp) {
            matcherRelation = "matching";
        }

        var that = this;
        var derivedPromise = getBasePromise(that).then(
            function (value) {
                var assertionMessage = null;
                var expected = null;
github open-webrtc-toolkit / owt-client-javascript / test / unit / resources / scripts / deps / chai-as-promised-browserified.js View on Github external
function getReasonName(reason) {
        return reason instanceof Error ? reason.toString() : checkError.getConstructorName(reason);
    }
github open-webrtc-toolkit / owt-client-javascript / test / unit / resources / scripts / deps / chai-as-promised.js View on Github external
function getReasonName(reason) {
        return reason instanceof Error ? reason.toString() : checkError.getConstructorName(reason);
    }
github RxJSInAction / rxjs-in-action / app / js / helpers / chai-as-promised-bundle.js View on Github external
function getReasonName(reason) {
        return (reason instanceof Error) ? reason.toString() : checkError.getConstructorName(reason);
    }

check-error

Error comparison and information related utility for node and the browser

MIT
Latest version published 6 months ago

Package Health Score

75 / 100
Full package analysis