fixed browser tests for async validation
parent
700cfb01a6
commit
f4ca190010
|
@ -138,6 +138,10 @@ This bundle can be used with different module systems or creates global `Ajv` if
|
|||
|
||||
The browser bundle is available on [cdnjs](https://cdnjs.com/libraries/ajv).
|
||||
|
||||
Ajv is tested with these browsers:
|
||||
|
||||
[![Sauce Test Status](https://saucelabs.com/browser-matrix/epoberezkin.svg)](https://saucelabs.com/u/epoberezkin)
|
||||
|
||||
|
||||
## Validation keywords
|
||||
|
||||
|
|
|
@ -22,6 +22,11 @@ module.exports = function(config) {
|
|||
browserName: 'chrome',
|
||||
version: '27'
|
||||
},
|
||||
'SL_Chrome_37': {
|
||||
base: 'SauceLabs',
|
||||
browserName: 'chrome',
|
||||
version: '37'
|
||||
},
|
||||
'SL_Chrome': {
|
||||
base: 'SauceLabs',
|
||||
browserName: 'chrome'
|
||||
|
@ -45,11 +50,6 @@ module.exports = function(config) {
|
|||
base: 'SauceLabs',
|
||||
browserName: 'MicrosoftEdge'
|
||||
},
|
||||
'SL_FireFox_4': {
|
||||
base: 'SauceLabs',
|
||||
browserName: 'firefox',
|
||||
version: '4'
|
||||
},
|
||||
'SL_FireFox_17': {
|
||||
base: 'SauceLabs',
|
||||
browserName: 'firefox',
|
||||
|
@ -132,7 +132,7 @@ module.exports = function(config) {
|
|||
testName: 'Ajv'
|
||||
},
|
||||
captureTimeout: 900000,
|
||||
browserNoActivityTimeout: 500000,
|
||||
browserNoActivityTimeout: 300000,
|
||||
|
||||
customLaunchers: customLaunchers,
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ var TRANSPILE = {
|
|||
var MODES = [
|
||||
{ async: 'co*' },
|
||||
{ async: 'es7', transpile: 'nodent' },
|
||||
{ async: 'es7', transpile: 'regenerator' }
|
||||
{ async: 'co*', transpile: 'regenerator' }
|
||||
];
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "ajv",
|
||||
"version": "3.8.1",
|
||||
"version": "3.8.2",
|
||||
"description": "Another JSON Schema Validator",
|
||||
"main": "lib/ajv.js",
|
||||
"files": [
|
||||
|
|
|
@ -21,29 +21,40 @@ function getAjvInstances(opts) {
|
|||
{ async: 'co*' },
|
||||
{ async: 'es7' },
|
||||
{ async: 'es7', transpile: 'nodent' },
|
||||
{ async: '*', transpile: 'regenerator' },
|
||||
{ async: 'co*', allErrors: true },
|
||||
{ async: 'es7', allErrors: true },
|
||||
{ async: 'es7', transpile: 'nodent', allErrors: true },
|
||||
{ async: '*', transpile: 'regenerator', allErrors: true }
|
||||
{ async: 'es7', transpile: 'nodent', allErrors: true }
|
||||
];
|
||||
|
||||
var ua;
|
||||
try { ua = window.navigator.userAgent.toLowerCase(); } catch(e) {}
|
||||
|
||||
// regenerator does not work in IE9
|
||||
if (!/msie\s9/.test(ua)) {
|
||||
options = options.concat([
|
||||
{ async: '*', transpile: 'regenerator' },
|
||||
{ async: '*', transpile: 'regenerator', allErrors: true }
|
||||
]);
|
||||
}
|
||||
|
||||
if (fullTest) {
|
||||
options = options.concat([
|
||||
{ async: '*' },
|
||||
{ async: 'co*', transpile: 'regenerator' },
|
||||
{ allErrors: true },
|
||||
{ async: true, allErrors: true },
|
||||
{ async: '*', allErrors: true },
|
||||
{ async: 'co*', transpile: 'regenerator', allErrors: true }
|
||||
{ async: '*', allErrors: true }
|
||||
]);
|
||||
|
||||
var ua;
|
||||
try { ua = window.navigator.userAgent.toLowerCase(); } catch(e) {}
|
||||
if (!/msie\s9/.test(ua)) {
|
||||
options = options.concat([
|
||||
{ async: 'co*', transpile: 'regenerator' },
|
||||
{ async: 'co*', transpile: 'regenerator', allErrors: true }
|
||||
]);
|
||||
}
|
||||
|
||||
// es7 functions transpiled with regenerator are excluded from test in Safari.
|
||||
// They emit multiple 'uncaught exception' warnings in Safari anc cause remote tests to disconnect.
|
||||
if (ua && (!/safari/.test(ua) || /chrome/.test(ua))) {
|
||||
// es7 functions transpiled with regenerator are excluded from test in Safari/Firefox/Edge/IE9.
|
||||
// They fail in IE9 and emit multiple 'uncaught exception' warnings in Safari/Firefox/Edge anc cause remote tests to disconnect.
|
||||
if (ua && (!/safari/.test(ua) || /chrome|phantomjs/.test(ua)) && (!/firefox|edge|msie\s9/.test(ua))) {
|
||||
options = options.concat([
|
||||
{ transpile: 'regenerator' },
|
||||
{ async: true, transpile: 'regenerator' },
|
||||
|
|
Loading…
Reference in New Issue