Comments (4)
Lets break apart that line a bit, and update your local copy with the snippet below, then tell me what the console output values are..
doesFileExistIsCurrentProjectAddonModule: function(_relativePath) {
console.log('_relativePath', _relativePath);
var relativePathWithoutProjectNamePrefix = relativePath.replace(path.join('modules', this.project.pkg.name), '');
console.log('relativePathWithoutProjectNamePrefix', relativePathWithoutProjectNamePrefix);
var relativePath = path.join('addon', relativePathWithoutProjectNamePrefix);
console.log('relativePath', relativePath);
if (this._existsSync(relativePath)) {
return true;
}
return this._doesTemplateFileExist(relativePath);
},
I suspect, that we actually should be doing the following to cleanup/sanitize using /
before checking _existsSync
:
var relativePathWithoutProjectNamePrefix = relativePath.replace('modules' + '/' + this.project.pkg.name, '');
var relativePath = 'addon/' + relativePathWithoutProjectNamePrefix;
console.log('relativePath', relativePath);
from ember-cli-code-coverage.
Hi Robert, thanks for looking into this. Here the output for one file:
_relativePath modules/lib-ember-addon/transforms/tstamp.js
relativePathWithoutProjectNamePrefix modules/lib-ember-addon/transforms/tstamp.js
relativePath addon\modules\lib-ember-addon\transforms\tstamp.js
from ember-cli-code-coverage.
Indeed, your second code snippet fixes the problem.
from ember-cli-code-coverage.
Submitted #49 to fix.
from ember-cli-code-coverage.
Related Issues (20)
- No clear documentation on usage of beta version in actual ember addons HOT 5
- require.buildBabelPlugin is not a function or its return value is not iterable HOT 5
- TS files are not included in the coverage with `--path` option HOT 2
- Dramatic build slowdown when enabled HOT 3
- Question - Is there a way to fail the test run if the coverage is below a certain threshold?
- Request aborted - BadRequestError seen from v2.0.0-beta.2 HOT 6
- write-coverage errors out with 403
- Seems to break when using the ember-concurrency new api HOT 5
- Unexpected token { error
- [QUERY] Is it possible to generate the coverage for a specific file/spec module (integration) HOT 2
- Issue with migration to v2.0.0
- No coverage report generated when used with @embroider/compat@^2.1.0 HOT 10
- Exclude app files from ember engine? tried with many glob patterns nothing is working.. HOT 1
- Socket timeouts POSTing to /write-coverage when running tests in CI mode HOT 3
- Not respecting "inputSourceMap" field from reported coverage data (fails for .gjs - ember-template-imports) HOT 2
- New release? HOT 10
- Coverage not collected in Embroider >3.1 HOT 6
- Is it possible to get coverage of hbs files with qunits and this coverage tool? HOT 1
- Issues with first-class component templates? HOT 12
- Embroider Tests are verifying that we have no coverage data HOT 1
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 ember-cli-code-coverage.