Running ng test with --include fails for IE11 #21239
Labels
area: @angular-devkit/build-angular
devkit/build-angular:karma
freq1: low
Only reported by a handful of users who observe it rarely
severity3: broken
type: bug/fix
Milestone
🐞 Bug report
Command (mark with an
x
)Is this a regression?
No, I don't think so.
Description
ng test --browsers=IE --include=**/*.spec.ts
fails to run.When tsconfig is targeting es5 because of IE11 support, running
ng test
with the--include
flag replaces theconst context = require.context...
through thesingle-test-transform
-plugin. The replacement is not transpiled further and thus fails to run tests in IE11.We are using angular11, but this is still the case for angular12.
🔬 Minimal Reproduction
ng new test-ie
npm install karma-ie-launcher --save-dev
not
before IE11 in.browserslistrc
require('karma-ie-launcher'),
in karma.conf.js"es5"
intsconfig.json
ng test --browsers=IE --include="**/*.spec.ts"
🔥 Exception or Error
Browser:
Console:
🌍 Your Environment
Anything else relevant?
Just happens with IE11.
The text was updated successfully, but these errors were encountered: