Make Karma serve .ts files with executable MIME type, otherwise newer versions of Chrome won't run it. Fixes #499

This commit is contained in:
SteveSandersonMS
2017-01-03 17:33:45 +00:00
parent 49bece54c2
commit 8c456aa0fc
2 changed files with 2 additions and 1 deletions

View File

@@ -13,7 +13,7 @@ describe('Counter component', () => {
});
it('should display a title', async(() => {
const titleText = fixture.nativeElement.querySelector('h2').textContent;
const titleText = fixture.nativeElement.querySelector('h1').textContent;
expect(titleText).toEqual('Counter');
}));

View File

@@ -18,6 +18,7 @@ module.exports = function (config) {
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
mime: { 'application/javascript': ['ts','tsx'] },
singleRun: false,
webpack: require('../../webpack.config.js').filter(config => config.target !== 'node'), // Test against client bundle, because tests run in a browser
webpackMiddleware: { stats: 'errors-only' }