-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using rewire within test #10
Comments
Sorry, this error description is too vague. Could you create an example repository that demonstrates the problem? |
I can look at doing something today / tomorrow thanks @jhnns |
Not sure if this is related. But I'll just put it here. Anyway, I'll just create an issue if not 😉. I'm using Karma along with Mocha and Webpack, and it doesn't seem to work although I've followed the instructions. This is the error:
This is my karma config: // Webpack config
webpack: {
module: {
loaders: [
{ test: /\.(js|jsx)$/, exclude: /node_modules/, loader: "babel-loader?modules=common&stage=0" }
]
},
resolve: {
extensions: ['', '.js', '.jsx', '.es6']
},
devtool: 'inline-source-map',
plugins: [new RewirePlugin()]
}, |
@srph I do not think your question is related to this issue. I hope that solves yoour issue! |
Maybe related to #11? |
It's related. Thanks. |
@nwhite89 Are you using babel? |
No afraid not, I was basically trying to require one of my own AMD modules then within a Karma test require in the module I am wanting to test but I wanted to change a set variable within that module (which requires from another module). Purely testing purposes, I haven't tried anymore as I had to "timebox" what it was I was doing, I shall try and look at this again at some point this week @jhnns cheers |
I'm wanting to use
rewire-webpack
within a Karma test is this possible? I'm wanting to run my test load in the module in which to test and run it through rewire allowing me to change specific functions which I believe rewire allows you to do?The problem I'm getting is that it doesn't seem to be able to load the module
be great to get an idea on this thanks
The text was updated successfully, but these errors were encountered: