Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Feature/karma sourcemap fix #35

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions config/webpack.config.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ var path = require('path');
module.exports = function()
{
return {
/**
* Inline source maps, generated by TypeScript compiler, will be used.
*/
devtool: 'inline-source-map',

resolve: {
extensions: ['', '.ts', '.js']
},
Expand Down Expand Up @@ -51,5 +46,12 @@ module.exports = function()
}
]
},
// we use this instead of the devtool option, to force sourcemap generation for .ts files
plugins: [
new webpack.SourceMapDevToolPlugin({
filename: null,
test: /\.(t|j|cs)s($|\?)/i
})
]
};
};
5 changes: 3 additions & 2 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = function(config)

// List of test frameworks we will use. Most of them are provided by separate packages (adapters).
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['mocha', 'chai', 'source-map-support'],
frameworks: ['mocha', 'chai'],

// Entry point / test environment builder is also written in TypeScript.
files: [
Expand All @@ -27,7 +27,8 @@ module.exports = function(config)
'coverage'
],
'./test/**/*.ts': [
'webpack'
'webpack',
'sourcemap'
]
},

Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
},
"devDependencies": {
"archiver": "^1.0.0",
"awesome-typescript-loader": "^2.0.1",
"awesome-typescript-loader": "2.0.1",
"chai": "^3.5.0",
"coveralls": "^2.11.6",
"es6-promise": "^3.2.1",
Expand All @@ -87,7 +87,6 @@
"karma-mocha": "^1.1.1",
"karma-phantomjs-launcher": "^1.0.0",
"karma-remap-istanbul": "^0.1.1",
"karma-source-map-support": "^1.1.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^1.7.0",
"marked": "^0.3.5",
Expand Down