Skip to content

Commit 8c456aa

Browse files
Make Karma serve .ts files with executable MIME type, otherwise newer versions of Chrome won't run it. Fixes aspnet#499
1 parent 49bece5 commit 8c456aa

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

templates/Angular2Spa/ClientApp/app/components/counter/counter.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ describe('Counter component', () => {
1313
});
1414

1515
it('should display a title', async(() => {
16-
const titleText = fixture.nativeElement.querySelector('h2').textContent;
16+
const titleText = fixture.nativeElement.querySelector('h1').textContent;
1717
expect(titleText).toEqual('Counter');
1818
}));
1919

templates/Angular2Spa/ClientApp/test/karma.conf.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ module.exports = function (config) {
1818
logLevel: config.LOG_INFO,
1919
autoWatch: true,
2020
browsers: ['Chrome'],
21+
mime: { 'application/javascript': ['ts','tsx'] },
2122
singleRun: false,
2223
webpack: require('../../webpack.config.js').filter(config => config.target !== 'node'), // Test against client bundle, because tests run in a browser
2324
webpackMiddleware: { stats: 'errors-only' }

0 commit comments

Comments
 (0)