Skip to content

Commit ebed7aa

Browse files
jelbournkara
authored andcommitted
chore(ivy): avoid global error issues with karma-jasmine
1 parent d3ef3bf commit ebed7aa

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
@@ -110,7 +110,7 @@
110110
"karma-browserstack-launcher": "^1.3.0",
111111
"karma-chrome-launcher": "^2.2.0",
112112
"karma-firefox-launcher": "^1.0.1",
113-
"karma-jasmine": "^2.0.1",
113+
"karma-jasmine": "github:jelbourn/karma-jasmine",
114114
"karma-json-result-reporter": "^1.0.0",
115115
"karma-parallel": "^0.3.0",
116116
"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
@@ -6142,10 +6142,9 @@ karma-jasmine@1.1.1:
61426142
resolved "https://registry.yarnpkg.com/karma-jasmine/-/karma-jasmine-1.1.1.tgz#6fe840e75a11600c9d91e84b33c458e1c46a3529"
61436143
integrity sha1-b+hA51oRYAydkehLM8RY4cRqNSk=
61446144

6145-
karma-jasmine@^2.0.1:
6145+
"karma-jasmine@github:jelbourn/karma-jasmine":
61466146
version "2.0.1"
6147-
resolved "https://registry.yarnpkg.com/karma-jasmine/-/karma-jasmine-2.0.1.tgz#26e3e31f2faf272dd80ebb0e1898914cc3a19763"
6148-
integrity sha512-iuC0hmr9b+SNn1DaUD2QEYtUxkS1J+bSJSn7ejdEexs7P8EYvA1CWkEdrDQ+8jVH3AgWlCNwjYsT1chjcNW9lA==
6147+
resolved "https://codeload.github.com/jelbourn/karma-jasmine/tar.gz/32cf88cc5fa70e2270eb984aaa56356cca639be8"
61496148
dependencies:
61506149
jasmine-core "^3.3"
61516150

0 commit comments

Comments
 (0)