How to use the coveralls.getOptions function in coveralls

To help you get started, we’ve selected a few coveralls 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 semantic-machines / veda / Gruntfile.js View on Github external
function submitToCoveralls(fileName, callback) {
        grunt.verbose.writeln("Submitting file to coveralls.io: " + fileName);

        var coveralls = require('coveralls');

        // Override coveralls option processing until it handles use as a library better (TODO)
        coveralls.getOptions = coveralls.getBaseOptions;

        var fs = require('fs');

        fs.readFile(fileName, 'utf8', function(err, fileContent) {
          if (err) {
            grunt.log.error("Failed to read file '" + fileName + "', with error: " + err);
            return callback(false);
          }

          coveralls.handleInput(fileContent, function(err) {
            if (err) {
              grunt.log.error("Failed to submit '" + fileName + "' to coveralls: " + err);
              return callback(false);
            }

            grunt.verbose.ok("Successfully submitted " + fileName + " to coveralls");
github pimterry / grunt-coveralls / tasks / coverallsTask.js View on Github external
function submitToCoveralls(fileName, callback) {
        grunt.verbose.writeln("Submitting file to coveralls.io: " + fileName);

        var coveralls = require('coveralls');

        // Override coveralls option processing until it handles use as a library better (TODO)
        coveralls.getOptions = coveralls.getBaseOptions;

        var fs = require('fs');

        fs.readFile(fileName, 'utf8', function(err, fileContent) {
          if (err) {
            grunt.log.error("Failed to read file '" + fileName + "', with error: " + err);
            return callback(false);
          }

          coveralls.handleInput(fileContent, function(err) {
            if (err) {
              grunt.log.error("Failed to submit '" + fileName + "' to coveralls: " + err);
              return callback(false);
            }

            grunt.verbose.ok("Successfully submitted " + fileName + " to coveralls");

coveralls

takes json-cov output into stdin and POSTs to coveralls.io

BSD-2-Clause
Latest version published 3 years ago

Package Health Score

53 / 100
Full package analysis