Skip to content

Commit 22dabac

Browse files
committed
Simplify karma configs - remove type: js from .ts files
- Removed type: "js" specification from all .ts test files - Let Babel preprocessor handle TypeScript transpilation - Simplified file patterns to not specify type - This allows Babel to properly transform TypeScript before serving to browser - Fixes issue where browser tests weren't running (0 tests executed)
1 parent 371994e commit 22dabac

File tree

5 files changed

+32
-32
lines changed

5 files changed

+32
-32
lines changed

test/deployment/amd/karma.conf.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ module.exports = config => {
2929
included: false
3030
},
3131

32-
{ pattern: "test/utils/compare.ts", type: "js" },
33-
{ pattern: "test/deployment/amd/loadGlobals.ts", type: "js" },
32+
"test/utils/compare.ts",
33+
"test/deployment/amd/loadGlobals.ts",
3434

35-
{ pattern: "test/deployment/amd/amd.spec.ts", type: "js" },
35+
"test/deployment/amd/amd.spec.ts",
3636

3737
{
38-
pattern: "test/specs/*.spec.ts",
39-
included: true,
40-
watched: true,
41-
served: true,
42-
type: "js"
38+
pattern: "test/specs/*.spec.ts"
39+
included: true
40+
watched: true
41+
served: true
42+
4343
},
4444
{
4545
pattern: "test/**/*.+(svg|png|jpg|jpeg|ttf|txt)",

test/deployment/esm/karma.conf.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,24 @@ module.exports = config => {
1616
"node_modules/html2canvas/dist/html2canvas.js", // load html2canvas globally - can't test dynamic import without symbolic name resolution
1717
"node_modules/dompurify/dist/purify.js",
1818

19-
{ pattern: "test/utils/compare.ts", type: "js" },
20-
{ pattern: "test/deployment/esm/loadGlobals.ts", type: "js" },
19+
"test/utils/compare.ts",
20+
"test/deployment/esm/loadGlobals.ts",
2121

2222
{
2323
pattern: "test/deployment/esm/asyncImportHelper.ts",
24-
included: true,
25-
watched: true,
24+
included: true
25+
watched: true
2626
type: "module"
2727
},
2828

29-
{ pattern: "test/deployment/esm/esm.spec.ts", type: "js" },
29+
"test/deployment/esm/esm.spec.ts",
3030

3131
{
32-
pattern: "test/specs/*.spec.ts",
33-
included: true,
34-
watched: true,
35-
served: true,
36-
type: "js"
32+
pattern: "test/specs/*.spec.ts"
33+
included: true
34+
watched: true
35+
served: true
36+
3737
},
3838
{
3939
pattern: "test/**/*.+(svg|png|jpg|jpeg|ttf|txt)",

test/deployment/globals/karma.conf.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ module.exports = config => {
1717
"node_modules/html2canvas/dist/html2canvas.js",
1818
"node_modules/dompurify/dist/purify.js",
1919

20-
{ pattern: "test/deployment/globals/loadGlobals.ts", type: "js" },
21-
{ pattern: "test/utils/compare.ts", type: "js" },
20+
"test/deployment/globals/loadGlobals.ts",
21+
"test/utils/compare.ts",
2222

23-
{ pattern: "test/deployment/globals/globals.spec.ts", type: "js" },
23+
"test/deployment/globals/globals.spec.ts",
2424

2525
{
26-
pattern: "test/specs/*.spec.ts",
27-
included: true,
28-
watched: true,
29-
served: true,
30-
type: "js"
26+
pattern: "test/specs/*.spec.ts"
27+
included: true
28+
watched: true
29+
served: true
30+
3131
},
3232
{
3333
pattern: "test/**/*.+(svg|png|jpg|jpeg|ttf|txt)",

test/deployment/typescript/karma.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module.exports = config => {
1515

1616
// list of files / patterns to load in the browser
1717
files: [
18-
{ pattern: "test/utils/compare.ts", type: "js" },
18+
"test/utils/compare.ts",
1919
{
2020
pattern: "test/deployment/typescript/*.spec.ts",
2121
type: "module"

test/deployment/webworker/karma.conf.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ module.exports = config => {
2020
included: false
2121
},
2222

23-
{ pattern: "test/utils/compare.ts", type: "js" },
23+
"test/utils/compare.ts",
2424

2525
{
2626
pattern: "test/deployment/webworker/*.spec.ts",
27-
included: true,
28-
watched: true,
29-
served: true,
30-
type: "js"
27+
included: true
28+
watched: true
29+
served: true
30+
3131
},
3232
{
3333
pattern: "test/**/*.+(svg|png|jpg|jpeg|ttf|txt)",

0 commit comments

Comments
 (0)