Skip to content

Commit 20f3023

Browse files
mportugadlgski
authored andcommitted
fix(build): Adding proxis to karma.conf.js (#5852)
* fix(build): Excluding css file from karma test. Getting rid of 404 errors by excluding the css file from the karma test. * fix(build): Adding proxis to karma.conf.js Ensuring font files don't return a 404 during karma tests.
1 parent 448edd4 commit 20f3023

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

test/karma.conf.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,20 @@ module.exports = function(config) {
2929
'test/unit/**/*.spec.js',
3030
'src/features/**/test/**/*.spec.js',
3131

32-
'.tmp/template.js' //templates
32+
'dist/release/ui-grid.css',
33+
34+
'.tmp/template.js' // templates
3335
],
3436

37+
// Ensures that font files do not cause a 404 error
38+
proxies: {
39+
'/base/dist/release/ui-grid.woff': 'src/font/ui-grid.woff',
40+
'/base/dist/release/ui-grid.ttf': 'src/font/ui-grid.ttf',
41+
'/base/dist/release/ui-grid.svg': 'src/font/ui-grid.svg'
42+
},
3543

3644
// list of files to exclude
3745
exclude: [
38-
'dist/release/ui-grid.css'
3946
],
4047

4148

test/karma.debug.conf.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ module.exports = function(config) {
3434
'.tmp/template.js' //templates
3535
],
3636

37+
// Ensures that font files do not cause a 404 error
38+
proxies: {
39+
'/base/dist/release/ui-grid.woff': 'src/font/ui-grid.woff',
40+
'/base/dist/release/ui-grid.ttf': 'src/font/ui-grid.ttf',
41+
'/base/dist/release/ui-grid.svg': 'src/font/ui-grid.svg'
42+
},
43+
3744

3845
// list of files to exclude
3946
exclude: [

0 commit comments

Comments
 (0)