Skip to content

Commit fca1c02

Browse files
committed
chore(ivy): avoid global error issues with karma-jasmine
1 parent 348b3ef commit fca1c02

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
"karma-browserstack-launcher": "^1.3.0",
113113
"karma-chrome-launcher": "^2.2.0",
114114
"karma-firefox-launcher": "^1.0.1",
115-
"karma-jasmine": "^2.0.1",
115+
"karma-jasmine": "github:jelbourn/karma-jasmine",
116116
"karma-json-result-reporter": "^1.0.0",
117117
"karma-parallel": "^0.3.0",
118118
"karma-sauce-launcher": "^2.0.2",

scripts/ivy/generate-blocklist.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ const karmaOutput = JSON.parse(fs.readFileSync('/tmp/karma-result.json'));
88

99
let generatedBlocklist = {};
1010
for (const desc of Object.keys(karmaOutput)) {
11+
// If karma encounters global errors, it adds them to an array keyed __BROWSER_ERRORS__.
12+
// We ignore this since it's not associated with any particular test. It generally shouldn't
13+
// happen at all because we're using a forked version of karma-jasmine that does not report
14+
// global errors per-suite.
15+
if (desc === '__BROWSER_ERRORS__') {
16+
continue;
17+
}
18+
1119
generatedBlocklist = {...generatedBlocklist, ...getFullFailure(karmaOutput[desc], desc)};
1220
}
1321

yarn.lock

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6418,10 +6418,9 @@ [email protected]:
64186418
resolved "https://registry.yarnpkg.com/karma-jasmine/-/karma-jasmine-1.1.1.tgz#6fe840e75a11600c9d91e84b33c458e1c46a3529"
64196419
integrity sha1-b+hA51oRYAydkehLM8RY4cRqNSk=
64206420

6421-
karma-jasmine@^2.0.1:
6421+
"karma-jasmine@github:jelbourn/karma-jasmine":
64226422
version "2.0.1"
6423-
resolved "https://registry.yarnpkg.com/karma-jasmine/-/karma-jasmine-2.0.1.tgz#26e3e31f2faf272dd80ebb0e1898914cc3a19763"
6424-
integrity sha512-iuC0hmr9b+SNn1DaUD2QEYtUxkS1J+bSJSn7ejdEexs7P8EYvA1CWkEdrDQ+8jVH3AgWlCNwjYsT1chjcNW9lA==
6423+
resolved "https://codeload.github.com/jelbourn/karma-jasmine/tar.gz/32cf88cc5fa70e2270eb984aaa56356cca639be8"
64256424
dependencies:
64266425
jasmine-core "^3.3"
64276426

0 commit comments

Comments
 (0)