How to use the karma/lib/constants.EXIT_CODE function in karma

To help you get started, we’ve selected a few karma 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 MortenHoustonLudvigsen / KarmaTestAdapter / karma-vs-reporter / src / Commands / ServedRun.ts View on Github external
function parseExitCode(buffer, defaultCode) {
    var constants = require('karma/lib/constants');
    var tailPos = buffer.length - Buffer.byteLength(constants.EXIT_CODE) - 1;

    if (tailPos < 0) {
        return defaultCode;
    }

    // tail buffer which might contain the message
    var tail = buffer.slice(tailPos);
    var tailStr = tail.toString();
    if (tailStr.substr(0, tailStr.length - 1) === constants.EXIT_CODE) {
        tail.fill('\x00');
        return parseInt(tailStr.substr(-1), 10);
    }

    return defaultCode;
}
github MortenHoustonLudvigsen / KarmaTestAdapter / karma-vs-reporter / src / Commands / ServedRun.ts View on Github external
function parseExitCode(buffer, defaultCode) {
    var constants = require('karma/lib/constants');
    var tailPos = buffer.length - Buffer.byteLength(constants.EXIT_CODE) - 1;

    if (tailPos < 0) {
        return defaultCode;
    }

    // tail buffer which might contain the message
    var tail = buffer.slice(tailPos);
    var tailStr = tail.toString();
    if (tailStr.substr(0, tailStr.length - 1) === constants.EXIT_CODE) {
        tail.fill('\x00');
        return parseInt(tailStr.substr(-1), 10);
    }

    return defaultCode;
}
github MortenHoustonLudvigsen / KarmaTestAdapter / karma-vs-reporter / src / Commands / ServedRun.js View on Github external
function parseExitCode(buffer, defaultCode) {
    var constants = require('karma/lib/constants');
    var tailPos = buffer.length - Buffer.byteLength(constants.EXIT_CODE) - 1;

    if (tailPos < 0) {
        return defaultCode;
    }

    // tail buffer which might contain the message
    var tail = buffer.slice(tailPos);
    var tailStr = tail.toString();
    if (tailStr.substr(0, tailStr.length - 1) === constants.EXIT_CODE) {
        tail.fill('\x00');
        return parseInt(tailStr.substr(-1), 10);
    }

    return defaultCode;
}
github MortenHoustonLudvigsen / KarmaTestAdapter / karma-vs-reporter / src / Commands / ServedRun.js View on Github external
function parseExitCode(buffer, defaultCode) {
    var constants = require('karma/lib/constants');
    var tailPos = buffer.length - Buffer.byteLength(constants.EXIT_CODE) - 1;

    if (tailPos < 0) {
        return defaultCode;
    }

    // tail buffer which might contain the message
    var tail = buffer.slice(tailPos);
    var tailStr = tail.toString();
    if (tailStr.substr(0, tailStr.length - 1) === constants.EXIT_CODE) {
        tail.fill('\x00');
        return parseInt(tailStr.substr(-1), 10);
    }

    return defaultCode;
}
github MortenHoustonLudvigsen / KarmaTestAdapter / karma-vs-reporter / src / Runner.ts View on Github external
emitter.once('run_complete', function (browsers, results) {
                    reporter.removeAdapter(responseWrite);
                    response.end(constant.EXIT_CODE + results.exitCode);
                });
            });
github MortenHoustonLudvigsen / KarmaTestAdapter / karma-vs-reporter / src / Runner.js View on Github external
emitter.once('run_complete', function (browsers, results) {
                    reporter.removeAdapter(responseWrite);
                    response.end(constant.EXIT_CODE + results.exitCode);
                });
            });