Comments (7)
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.
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.
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:
from browserify-istanbul.
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.
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.
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.
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)
- Expose configuration options to pass to istanbul HOT 3
- Browserify transforms order? HOT 3
- Plans to release a 0.1.4 version? HOT 1
- struggling to get anything other than 100% coverage HOT 1
- worth adding 'bower_components' to default ignore? HOT 1
- There should be a place to tell you that this thing is great HOT 1
- cannot exclude directory from source code report HOT 3
- unclear instructions
- Only supports html reports? HOT 1
- Cannot Ignore Code with /* istanbul ignore next */ HOT 4
- Update istanbul version HOT 2
- Make `istanbul` an optional dependency HOT 1
- Add support for passing options to `minimatch`
- Doesn't work with latest Browserify HOT 2
- `istanbul` should not be `require()`d if `options.instrumenter` is set HOT 2
- minimatchOptions default settings
- Karma-browserify tests failing or not generating report
- Support latest (unstable) [email protected] HOT 2
- Reading configuration fro .istanbul.yml
- Upgrading to version 3 leads to exception HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from browserify-istanbul.