Comments (9)
Relative to your karma config file, where is healthCheckStatus.view.html
?
from karma-redirect-preprocessor.
./karma-config.js
./src/main/app/components/healthcheck/healthcheckStatus.view.html
./src/main/app/components/healthcheck/healthcheckStatus.component.ts
The target path for these would be
app/component/healthcheck/
Setting the templareUrl to:
templateUrl: 'app/components/healthcheck/healthcheckStatus.view.html'
shows the component but the tests fail
If I change the template url to:
'src/main/app/components/healthcheck/healthcheckStatus.view.html'
the tests pass but the component fails to load (404)
from karma-redirect-preprocessor.
I think instead of prependPrefix
you want stripPrefix
from karma-redirect-preprocessor.
Sorry for the delay I've not tried it yet but planning to this week. Once I do I'll let you know.
from karma-redirect-preprocessor.
So what happened here ? Been more than a month and I think I've got the same problem.
I'm at a loss as to what to use. the file itself, uses a template url as
templateUrl: './features/sidenav/sidenav.component.html'
the karma conf has
preprocessors: {
'app/**/*.html': ['redirect']
},
and
redirectPreprocessor: {
// strip this from the file path
stripPrefix: 'app/',
// prepend this to the path
prependPrefix: 'dev/',
},
The actual path of the file i'm trying to test is
app/features/sidenav/sidenav.component.html
where "app" is in the same folder as the karma config.
Error kicked up when testing is
Failed: Failed to load features/sidenav/sidenav.component.html
from karma-redirect-preprocessor.
Ok got past it. we're also using defined plugins so I also needed to add the reference to the plugin in the config 'karma-redirect-preprocessor'
(thing just wasn't loading at all), and the path having the problem was from grunt output so I had to strip a prefix of dev/
.
from karma-redirect-preprocessor.
also note that you will need to do this for css files also.
from karma-redirect-preprocessor.
Hi we ended up with going with a different plugin that inlines them instead: https://github.com/ludohenin/gulp-inline-ng2-template
Thanks @sjelin though for this one and for the prompt responses 👍
from karma-redirect-preprocessor.
It sounds like everyone's solve their problems so I'm closing this
from karma-redirect-preprocessor.
Related Issues (2)
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 karma-redirect-preprocessor.