GithubHelp home page GithubHelp logo

Comments (7)

devongovett avatar devongovett commented on July 1, 2024

Hmm, that might be either a browserify issue, or an instanbul one. I pass the path that browserify hands me directly on to instanbul with no modifications. Does it work when running istanbul without browserify (e.g. on a node project)?

from browserify-istanbul.

scamden avatar scamden commented on July 1, 2024

haven't tested but it look like istanbul itself might have an issue with
symlinks from reading a couple issues over there. i'll try to set up a test
nonetheless.

On 23 September 2014 16:31, Devon Govett [email protected] wrote:

Hmm, that might be either a browserify issue, or an instanbul one. I pass
the path that browserify hands me directly on to instanbul with no
modifications. Does it work when running istanbul without browserify (e.g.
on a node project)?


Reply to this email directly or view it on GitHub
#6 (comment)
.

Sterling Camden
Software Engineer
502 Emerson Street | Palo Alto, CA 94301
303.520.2968 | [email protected]

See RelateIQ in the Wall Street Journal
http://online.wsj.com/news/articles/SB10001424127887323949904578539983425941490,

TechCrunch
http://techcrunch.com/2013/06/12/relateiq-launches-with-29m-from-formation-8-dustin-moskovitz-and-more-to-be-your-next-gen-relationship-manager/,
Forbes
http://www.forbes.com/sites/michaelsimmons/2014/01/14/the-one-thing-you-should-do-after-meeting-anyone-new/,
and More http://blog.relateiq.com/tag/relateiqinthenews/!

from browserify-istanbul.

dflynn15 avatar dflynn15 commented on July 1, 2024

Was this ever resolved? I am running into a similar problem using the revealing module pattern. For example:

testfile.js:

app.testfile = (function() {

  function mathFunctions() {

    function add(val1, val2) {
      return val1 + val2;
    }

    function minus(val1, val2) {
      return val1- val2;
    }

    return {
      add: add,
      minus: minus
    }
  }

  return {
    math: mathFunctions
  }
})();

testspec.js:

'use strict';
global.app = {};
require('../../src/js/testfile.js');
describe('Test file', function() {
var mathFunctions = app.testfile.math();
  describe('Math functions', function() {
    describe('add', function() {
      it('should return correct addition', function() {
        expect(mathFunctions.add(1, 1)).toBe(2);
      });
    });

    describe('minus', function() {
      it('should return correct subtraction', function() {
        expect(mathFunctions.minus(1, 1)).toBe(0);
      });
    });
  })
});

but when run my coverage looks like this:
screenshot 2015-01-15 12 36 40

from browserify-istanbul.

scamden avatar scamden commented on July 1, 2024

i'm not sure if it was resolved on istanbul's side, but i was able to fix my particular issues by bundling the files starting from the symlinked directory instead of the other way, just for tests. i actually switched to using aliasify (a browserify transform) ultimately because there were just too many issues with symlinks

from browserify-istanbul.

dflynn15 avatar dflynn15 commented on July 1, 2024

Interesting. I'm not sure at all if my issue is the same, however the output seems to be similar enough. I was using browserify-istanbul as a transform in Karma and using Karma coverage to generate reports, buuutttt as you can see it is totally not working. 😞

from browserify-istanbul.

scamden avatar scamden commented on July 1, 2024

ya from tha output it looks like it's seeing the execution of the script
only but not the call to mathFunctions.. not sure man sorry

On Thu Jan 15 2015 at 9:38:27 AM Daniel Flynn [email protected]
wrote:

Was this ever resolved? I am running into a similar problem using the
revealing module pattern. For example:

testfile.js:

app.testfile = (function() {

function mathFunctions() {

function add(val1, val2) {
  return val1 + val2;
}

function minus(val1, val2) {
  return val1- val2;
}

return {
  add: add,
  minus: minus
}

}

return {
math: mathFunctions
}
})();

testspec.js:

'use strict';global.app = {};require('../../src/js/testfile.js');
describe('Test file', function() {var mathFunctions = app.testfile.math();
describe('Math functions', function() {
describe('add', function() {
it('should return correct addition', function() {
expect(mathFunctions.add(1, 1)).toBe(2);
});
});

describe('minus', function() {
  it('should return correct subtraction', function() {
    expect(mathFunctions.minus(1, 1)).toBe(0);
  });
});

})
});

but when run my coverage looks like this:
[image: screenshot 2015-01-15 12 36 40]
https://cloud.githubusercontent.com/assets/1205286/5762837/5c1bfe26-9cb3-11e4-9178-c4be289fd086.png


Reply to this email directly or view it on GitHub
#6 (comment)
.

from browserify-istanbul.

devongovett avatar devongovett commented on July 1, 2024

This was fixed by #15 apparently, by upgrading istanbul. I haven't tested though. Please try out v0.2.0 of browserify-istanbul and let me know if it works.

from browserify-istanbul.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.