Closed jbprat closed 7 years ago
Hello,
When something goes wrong, wallaby normally reports the details to the Failing Tests output (Ctrl +
) and it's the best place to start looking into. Wallaby console has a lot of debugging information reported and should only be used when troubleshooting some issues that are not clear from the Failing Tests output.
If you open the Failing Tests panel, you should be able to see some additional details:
The angular2-template-loader
module needs to be installed as described in the step 4 of the sample repo readme.
While looking into the details you've provided, I have also noticed a couple of more things.
@angular-redux
in the test, and because of the way the module is structured (and wallaby-webpack
works), webpack needs an alias like this (note that you don't need it for other modules): var webpackPostprocessor = wallabyWebpack({
...
resolve: {
modules: [
...
],
alias: {
'@angular-redux/store/testing': path.resolve(__dirname, 'node_modules/@angular-redux/store/lib/testing/index.js')
}
}
});
...
TestBed.initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
);
This call is only allowed once per run by angular, so you may want to remove it from the test file, because both karma and wallaby are making the call in their corresponding bootstrap files: Karma: https://github.com/wallabyjs/ngCliWebpackSample/blob/master/src/test.ts#L23 Wallaby: https://github.com/wallabyjs/ngCliWebpackSample/blob/master/src/wallabyTest.ts#L16
Thanks for the tips!
Issue description or question
Hello, I am trying to setup sublime + wallaby with an Angular 4 project built with angular-cli, using angular-cli webpack implementation. When starting wallaby I have this error:
I followed your ngCliWebpackSample git project.
Wallaby.js configuration file
Component code
Package.json
In case it helps, my package.json is here.
Code editor or IDE name and version
Sublime Text v3 build 3126
OS name and version
Windows 10 build 14393