It seems I am not adjusting the surface correctly.
Error:
ReferenceError: Can't find variable: Map at src/app/home/home.component.spec.ts:4 ReferenceError: Can't find variable: Map at http:
I installed my js
file as follows:
var wallabyWebpack = require('wallaby-webpack'); var webpackPostprocessor = wallabyWebpack({ entryPatterns: [ 'src/wallabyTest.js', 'src/**/*spec.js' ], module: { loaders: [ {test: /\.css$/, loader: 'raw-loader'}, {test: /\.html$/, loader: 'raw-loader'}, {test: /\.js$/, loader: 'angular2-template-loader', exclude: /node_modules/}, {test: /\.json$/, loader: 'json-loader'}, {test: /\.styl$/, loaders: ['raw-loader', 'stylus-loader']}, {test: /\.less$/, loaders: ['raw-loader', 'less-loader']}, {test: /\.scss$|\.sass$/, loaders: ['raw-loader', 'sass-loader']}, {test: /\.(jpg|png)$/, loader: 'url-loader?limit=128000'} ] } }); var compilerOptions = require('./src/tsconfig.json').compilerOptions; module.exports = function (wallaby) { return { files: [ {pattern: 'src/**/*.ts', load: false}, {pattern: 'src/**/*.d.ts', ignore: true}, {pattern: 'src/**/*.css', load: false}, {pattern: 'src/**/*.html', load: false}, {pattern: 'src/**/*spec.ts', ignore: true}, {pattern: 'node_modules/babel-polyfill/browser.js', instrument: false} ], tests: [ {pattern: 'src/**/*spec.ts', load: false} ], testFramework: 'jasmine', compilers: { '**/*.ts': wallaby.compilers.typeScript(compilerOptions) }, postprocessor: webpackPostprocessor, setup: function () { window.__moduleBundler.loadTests(); }, debug: true }; };
Project Structure:
I found this tool today and am very glad that it works. I also have my GitHub Git project. Hub link
ReferenceError: Can't find variable: Map at src/app/home/home.component.spec.ts:4
After some research, I added the following to the wallaby.js file to make sure that it does not use the compiler, since wallaby has it.
{pattern: 'node_modules/babel-polyfill/browser.js', instrument: false}
However, I still get the same error.