We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b9d4cc3 + cb65111 commit a8d8aa2Copy full SHA for a8d8aa2
tests/utils/ajax-test.js
@@ -103,10 +103,17 @@ module('ajax()', function (hooks) {
103
assert.true(error.isJsonError);
104
assert.false(error.isNetworkError);
105
106
+ let expectedCauseMessages = [
107
+ // Chrome < 104
108
+ 'Unexpected token f in JSON at position 2',
109
+ // Chrome >= 104
110
+ "Expected property name or '}' in JSON at position 2",
111
+ ];
112
+
113
let { cause } = error;
114
assert.ok(!(cause instanceof HttpError));
115
assert.equal(cause.name, 'SyntaxError');
- assert.equal(cause.message, 'Unexpected token f in JSON at position 2');
116
+ assert.ok(expectedCauseMessages.includes(cause.message));
117
return true;
118
});
119
0 commit comments