Browse Source

[build]

master
Muthu Kumar 6 years ago
parent
commit
0f54a5e233
  1. 216
      es5/Runner.js
  2. 28
      es5/index.js

216
es5/Runner.js

@ -39,7 +39,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
}return r;
}()({ 1: [function (require, module, exports) {
module.exports = require('./src/runner');
}, { "./src/runner": 10 }], 2: [function (require, module, exports) {
}, { "./src/runner": 9 }], 2: [function (require, module, exports) {
//copyright Ryan Day 2010 <http://ryanday.org>, Joscha Feth 2013 <http://www.feth.com> [MIT Licensed]
var element_start_char = "a-zA-Z_\xC0-\xD6\xD8-\xF6\xF8-\xFF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FFF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD";
@ -280,192 +280,6 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
return '/';
};
}, {}], 4: [function (require, module, exports) {
// shim for using process in browser
var process = module.exports = {};
// cached from whatever global is present so that test runners that stub it
// don't break things. But we need to wrap it in a try catch in case it is
// wrapped in strict mode code which doesn't define any globals. It's inside a
// function because try/catches deoptimize in certain engines.
var cachedSetTimeout;
var cachedClearTimeout;
function defaultSetTimout() {
throw new Error('setTimeout has not been defined');
}
function defaultClearTimeout() {
throw new Error('clearTimeout has not been defined');
}
(function () {
try {
if (typeof setTimeout === 'function') {
cachedSetTimeout = setTimeout;
} else {
cachedSetTimeout = defaultSetTimout;
}
} catch (e) {
cachedSetTimeout = defaultSetTimout;
}
try {
if (typeof clearTimeout === 'function') {
cachedClearTimeout = clearTimeout;
} else {
cachedClearTimeout = defaultClearTimeout;
}
} catch (e) {
cachedClearTimeout = defaultClearTimeout;
}
})();
function runTimeout(fun) {
if (cachedSetTimeout === setTimeout) {
//normal enviroments in sane situations
return setTimeout(fun, 0);
}
// if setTimeout wasn't available but was latter defined
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
cachedSetTimeout = setTimeout;
return setTimeout(fun, 0);
}
try {
// when when somebody has screwed with setTimeout but no I.E. maddness
return cachedSetTimeout(fun, 0);
} catch (e) {
try {
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
return cachedSetTimeout.call(null, fun, 0);
} catch (e) {
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
return cachedSetTimeout.call(this, fun, 0);
}
}
}
function runClearTimeout(marker) {
if (cachedClearTimeout === clearTimeout) {
//normal enviroments in sane situations
return clearTimeout(marker);
}
// if clearTimeout wasn't available but was latter defined
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
cachedClearTimeout = clearTimeout;
return clearTimeout(marker);
}
try {
// when when somebody has screwed with setTimeout but no I.E. maddness
return cachedClearTimeout(marker);
} catch (e) {
try {
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
return cachedClearTimeout.call(null, marker);
} catch (e) {
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
return cachedClearTimeout.call(this, marker);
}
}
}
var queue = [];
var draining = false;
var currentQueue;
var queueIndex = -1;
function cleanUpNextTick() {
if (!draining || !currentQueue) {
return;
}
draining = false;
if (currentQueue.length) {
queue = currentQueue.concat(queue);
} else {
queueIndex = -1;
}
if (queue.length) {
drainQueue();
}
}
function drainQueue() {
if (draining) {
return;
}
var timeout = runTimeout(cleanUpNextTick);
draining = true;
var len = queue.length;
while (len) {
currentQueue = queue;
queue = [];
while (++queueIndex < len) {
if (currentQueue) {
currentQueue[queueIndex].run();
}
}
queueIndex = -1;
len = queue.length;
}
currentQueue = null;
draining = false;
runClearTimeout(timeout);
}
process.nextTick = function (fun) {
var args = new Array(arguments.length - 1);
if (arguments.length > 1) {
for (var i = 1; i < arguments.length; i++) {
args[i - 1] = arguments[i];
}
}
queue.push(new Item(fun, args));
if (queue.length === 1 && !draining) {
runTimeout(drainQueue);
}
};
// v8 likes predictible objects
function Item(fun, array) {
this.fun = fun;
this.array = array;
}
Item.prototype.run = function () {
this.fun.apply(null, this.array);
};
process.title = 'browser';
process.browser = true;
process.env = {};
process.argv = [];
process.version = ''; // empty string to avoid regexp issues
process.versions = {};
function noop() {}
process.on = noop;
process.addListener = noop;
process.once = noop;
process.off = noop;
process.removeListener = noop;
process.removeAllListeners = noop;
process.emit = noop;
process.prependListener = noop;
process.prependOnceListener = noop;
process.listeners = function (name) {
return [];
};
process.binding = function (name) {
throw new Error('process.binding is not supported');
};
process.cwd = function () {
return '/';
};
process.chdir = function (dir) {
throw new Error('process.chdir is not supported');
};
process.umask = function () {
return 0;
};
}, {}], 5: [function (require, module, exports) {
var statusMap = {
'ok': ['ok', '✅'],
@ -504,7 +318,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
module.exports = Default;
module.exports.convert = convert;
}, {}], 6: [function (require, module, exports) {
}, {}], 5: [function (require, module, exports) {
var def = require('./default');
var tap = require('./tap');
var xunit = require('./xunit');
@ -516,7 +330,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
xunit: xunit,
min: min
};
}, { "./default": 5, "./min": 7, "./tap": 8, "./xunit": 9 }], 7: [function (require, module, exports) {
}, { "./default": 4, "./min": 6, "./tap": 7, "./xunit": 8 }], 6: [function (require, module, exports) {
var _require = require('../util/constants'),
eventMap = _require.eventMap,
eventVerbs = _require.eventVerbs;
@ -565,7 +379,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
module.exports = Min;
module.exports.convert = convert;
}, { "../util/constants": 11, "../util/nodeutils": 12 }], 8: [function (require, module, exports) {
}, { "../util/constants": 10, "../util/nodeutils": 11 }], 7: [function (require, module, exports) {
var statusMap = {
'ok': 'ok',
@ -592,7 +406,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
module.exports = TAP;
module.exports.convert = convert;
}, {}], 9: [function (require, module, exports) {
}, {}], 8: [function (require, module, exports) {
var toXML = require('jsontoxml');
var _require3 = require('../util/nodeutils'),
@ -651,7 +465,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
module.exports = xunit;
module.exports.convert = convert;
}, { "../util/nodeutils": 12, "jsontoxml": 2 }], 10: [function (require, module, exports) {
}, { "../util/nodeutils": 11, "jsontoxml": 2 }], 9: [function (require, module, exports) {
var reporters = require('../reporters');
var isBrowser = new Function("try { return this === window } catch (e) { return false }");
@ -677,12 +491,12 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
if (RunInstances.length !== instances.length) throw new Error("Not all instances were of type " + type);
var perf = { start: Date.now() };
var perf = { start: new Date() };
return Promise.all(RunInstances.map(function (instance) {
return instance.run({ reporter: 'min' });
})).then(function (results) {
perf.end = Date.now();
perf.end = new Date();
results.start = perf.start.toUTCString();
results.end = perf.end.toUTCString();
results.duration = perf.end - perf.start;
@ -695,7 +509,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
};
module.exports = runner;
}, { "../reporters": 6 }], 11: [function (require, module, exports) {
}, { "../reporters": 5 }], 10: [function (require, module, exports) {
var _require4 = require('os'),
EOL = _require4.EOL;
@ -712,12 +526,16 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
skip: ['skip', 'skipping', 'skipped']
}
};
}, { "os": 3 }], 12: [function (require, module, exports) {
(function (process) {
}, { "os": 3 }], 11: [function (require, module, exports) {
(function (global) {
module.exports = {
clear: function clear() {
if (typeof global === 'undefined' || typeof global.process === 'undefined' || typeof global.process.stdout === 'undefined') return;
var process = global.process;
// clear screen
process.stdout.write("\x1B[2J");
// set cursor position to top
@ -725,6 +543,6 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
}
};
}).call(this, require('_process'));
}, { "_process": 4 }] }, {}, [1])(1);
}).call(this, typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {});
}, {}] }, {}, [1])(1);
});

28
es5/index.js

@ -1640,11 +1640,11 @@ function _toConsumableArray2(arr) { if (Array.isArray(arr)) { for (var i = 0, ar
error = void 0,
errored = void 0;
try {
perf.start = Date.now();
perf.start = new Date();
value = test(state);
perf.end = Date.now();
perf.end = new Date();
} catch (e) {
perf.end = Date.now();
perf.end = new Date();
errored = true;
error = e;
}
@ -1654,14 +1654,14 @@ function _toConsumableArray2(arr) { if (Array.isArray(arr)) { for (var i = 0, ar
if (promise) {
return value.then(function (res) {
return {
duration: Date.now() - perf.start,
duration: new Date() - perf.start,
status: 'ok',
resolve: res,
promise: true
};
}).catch(function (rej) {
return {
duration: Date.now() - perf.start,
duration: new Date() - perf.start,
status: 'notOk',
rejection: rej,
promise: true
@ -1861,10 +1861,10 @@ function _toConsumableArray2(arr) { if (Array.isArray(arr)) { for (var i = 0, ar
*/
var testrunner = function testrunner(instance) {
var perf = { start: Date.now() };
var perf = { start: new Date() };
return Promise.object(pipe(buildTestQueue, reduceQueue, pick('results'))(instance)).then(function (results) {
perf.end = Date.now();
perf.end = new Date();
results.end = perf.end.toUTCString();
results.start = perf.start.toUTCString();
results.duration = perf.end - perf.start;
@ -2085,12 +2085,12 @@ function _toConsumableArray2(arr) { if (Array.isArray(arr)) { for (var i = 0, ar
if (RunInstances.length !== instances.length) throw new Error("Not all instances were of type " + type);
var perf = { start: Date.now() };
var perf = { start: new Date() };
return Promise.all(RunInstances.map(function (instance) {
return instance.run({ reporter: 'min' });
})).then(function (results) {
perf.end = Date.now();
perf.end = new Date();
results.start = perf.start.toUTCString();
results.end = perf.end.toUTCString();
results.duration = perf.end - perf.start;
@ -2328,11 +2328,15 @@ function _toConsumableArray2(arr) { if (Array.isArray(arr)) { for (var i = 0, ar
};
}, { "json-stringify-safe": 6 }], 26: [function (require, module, exports) {
(function (process) {
(function (global) {
module.exports = {
clear: function clear() {
if (typeof global === 'undefined' || typeof global.process === 'undefined' || typeof global.process.stdout === 'undefined') return;
var process = global.process;
// clear screen
process.stdout.write("\x1B[2J");
// set cursor position to top
@ -2340,8 +2344,8 @@ function _toConsumableArray2(arr) { if (Array.isArray(arr)) { for (var i = 0, ar
}
};
}).call(this, require('_process'));
}, { "_process": 9 }], 27: [function (require, module, exports) {
}).call(this, typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {});
}, {}], 27: [function (require, module, exports) {
module.exports = {
Start: Symbol('Start'),

Loading…
Cancel
Save