Skip to content

Commit 5b7667c

Browse files
committed
fix 404 warning for assets
1 parent 5aa5b69 commit 5b7667c

File tree

3 files changed

+21
-7
lines changed

3 files changed

+21
-7
lines changed

karma.conf.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('./test-config/karma.conf.js');

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"build": "ionic-app-scripts build",
99
"ionic:build": "ionic-app-scripts build",
1010
"ionic:serve": "ionic-app-scripts serve",
11-
"test": "karma start ./test-config/karma.conf.js",
12-
"test-ci": "karma start ./test-config/karma.conf.js --single-run",
11+
"test": "karma start",
12+
"test-ci": "karma start --single-run",
1313
"e2e": "npm run e2e-update && npm run e2e-test",
1414
"e2e-test": "protractor ./test-config/protractor.conf.js",
1515
"e2e-update": "webdriver-manager update --standalone false --gecko false"

test-config/karma.conf.js

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,26 @@ module.exports = function(config) {
66

77
frameworks: ['jasmine'],
88

9-
files: [{
10-
pattern: './karma-test-shim.js',
11-
watched: true
12-
}],
9+
files: [
10+
{
11+
pattern: './test-config/karma-test-shim.js',
12+
watched: true
13+
},
14+
{
15+
pattern: './src/assets/**/*',
16+
watched: false,
17+
included: false,
18+
served: true,
19+
nocache: false
20+
}
21+
],
22+
23+
proxies: {
24+
'/assets/': '/base/src/assets/'
25+
},
1326

1427
preprocessors: {
15-
'./karma-test-shim.js': ['webpack', 'sourcemap']
28+
'./test-config/karma-test-shim.js': ['webpack', 'sourcemap']
1629
},
1730

1831
webpack: webpackConfig,

0 commit comments

Comments
 (0)