Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 2ba18e0

Browse files
committed
fixup! test(support): verify support tests results in all tested browsers
1 parent 6916651 commit 2ba18e0

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

test/ng/supportSpec.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ describe('support test results', function() {
77
// Support: iOS 8 only
88
if (/iPhone OS 10_1\d(?:_\d+)? /.test(userAgent)) {
99
// iOS 8 official simulators have broken user agent (containing something like `iPhone OS 10_12_5`,
10-
// i.e. the macOS version in place of the iOS version so they'd fall into an incorrect bucket.
10+
// i.e. the macOS version in place of the iOS version) so they'd fall into an incorrect bucket.
1111
// Fix the user agent there.
1212
// NOTE: Make sure the above check doesn't catch the real iOS 10!
13-
userAgent = userAgent.replace(/iPhone OS 10(?:_\d)+/, 'iPhone OS 8_1');
13+
userAgent = userAgent.replace(/iPhone OS 10(?:_\d+)+/, 'iPhone OS 8_1');
1414
}
1515

1616
if (/edge\//i.test(userAgent)) {
@@ -19,7 +19,7 @@ describe('support test results', function() {
1919
fatArrows: true,
2020
shorthandMethods: true
2121
};
22-
} else if (/(?:msie|trident)/i.test(userAgent)) {
22+
} else if (/msie|trident/i.test(userAgent)) {
2323
expected = {
2424
classes: false,
2525
fatArrows: false,
@@ -33,13 +33,13 @@ describe('support test results', function() {
3333
fatArrows: true,
3434
shorthandMethods: true
3535
};
36-
} else if (/\b9\.\d+(\.\d+)* safari/i.test(userAgent)) {
36+
} else if (/\b9(?:\.\d+)+ safari/i.test(userAgent)) {
3737
expected = {
3838
classes: true,
3939
fatArrows: false,
4040
shorthandMethods: true
4141
};
42-
} else if (/\b\d+\.\d+(\.\d+)* safari/i.test(userAgent)) {
42+
} else if (/\b\d+(?:\.\d+)+ safari/i.test(userAgent)) {
4343
expected = {
4444
classes: true,
4545
fatArrows: true,
@@ -85,6 +85,9 @@ describe('support test results', function() {
8585

8686
for (testName in expected) {
8787
it('should report support.' + testName + ' to be ' + expected[testName], function() {
88+
if (support[testName] !== expected[testName]) {
89+
window.console.log(userAgent);
90+
}
8891
expect(support[testName]).toBe(expected[testName]);
8992
});
9093
}

0 commit comments

Comments
 (0)