mirror of
https://github.com/henrywhitaker3/Speedtest-Tracker.git
synced 2026-01-04 03:54:51 +01:00
Updated to v1.9.9
This commit is contained in:
7
conf/site/node_modules/object.assign/test/.eslintrc
generated
vendored
7
conf/site/node_modules/object.assign/test/.eslintrc
generated
vendored
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"rules": {
|
||||
"max-statements-per-line": [2, { "max": 3 }],
|
||||
"no-magic-numbers": 0,
|
||||
"object-curly-newline": 0,
|
||||
}
|
||||
}
|
||||
8
conf/site/node_modules/object.assign/test/native.js
generated
vendored
8
conf/site/node_modules/object.assign/test/native.js
generated
vendored
@@ -3,7 +3,7 @@
|
||||
var test = require('tape');
|
||||
var defineProperties = require('define-properties');
|
||||
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
||||
var functionsHaveNames = function f() {}.name === 'f';
|
||||
var functionsHaveNames = require('functions-have-names')();
|
||||
|
||||
var runTests = require('./tests');
|
||||
|
||||
@@ -30,8 +30,10 @@ test('native', function (t) {
|
||||
// v8 in node 0.8 and 0.10 have non-enumerable string properties
|
||||
var stringCharsAreEnumerable = isEnumerable.call('xy', 0);
|
||||
t.test('when Object.assign is present and has pending exceptions', { skip: !stringCharsAreEnumerable || !Object.preventExtensions }, function (st) {
|
||||
// Firefox 37 still has "pending exception" logic in its Object.assign implementation,
|
||||
// which is 72% slower than our shim, and Firefox 40's native implementation.
|
||||
/*
|
||||
* Firefox 37 still has "pending exception" logic in its Object.assign implementation,
|
||||
* which is 72% slower than our shim, and Firefox 40's native implementation.
|
||||
*/
|
||||
var thrower = Object.preventExtensions({ 1: '2' });
|
||||
var error;
|
||||
try { Object.assign(thrower, 'xy'); } catch (e) { error = e; }
|
||||
|
||||
12
conf/site/node_modules/object.assign/test/ses-compat.js
generated
vendored
Normal file
12
conf/site/node_modules/object.assign/test/ses-compat.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
'use strict';
|
||||
|
||||
/* globals lockdown */
|
||||
|
||||
// requiring ses exposes "lockdown" on the global
|
||||
require('ses');
|
||||
|
||||
// lockdown freezes the primordials
|
||||
lockdown({ errorTaming: 'unsafe' });
|
||||
|
||||
// initialize the module
|
||||
require('./');
|
||||
8
conf/site/node_modules/object.assign/test/shimmed.js
generated
vendored
8
conf/site/node_modules/object.assign/test/shimmed.js
generated
vendored
@@ -6,7 +6,7 @@ assign.shim();
|
||||
var test = require('tape');
|
||||
var defineProperties = require('define-properties');
|
||||
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
||||
var functionsHaveNames = function f() {}.name === 'f';
|
||||
var functionsHaveNames = require('functions-have-names')();
|
||||
|
||||
var runTests = require('./tests');
|
||||
|
||||
@@ -33,8 +33,10 @@ test('shimmed', function (t) {
|
||||
// v8 in node 0.8 and 0.10 have non-enumerable string properties
|
||||
var stringCharsAreEnumerable = isEnumerable.call('xy', 0);
|
||||
t.test('when Object.assign is present and has pending exceptions', { skip: !stringCharsAreEnumerable || !Object.preventExtensions }, function (st) {
|
||||
// Firefox 37 still has "pending exception" logic in its Object.assign implementation,
|
||||
// which is 72% slower than our shim, and Firefox 40's native implementation.
|
||||
/*
|
||||
* Firefox 37 still has "pending exception" logic in its Object.assign implementation,
|
||||
* which is 72% slower than our shim, and Firefox 40's native implementation.
|
||||
*/
|
||||
var thrower = Object.preventExtensions({ 1: '2' });
|
||||
var error;
|
||||
try { Object.assign(thrower, 'xy'); } catch (e) { error = e; }
|
||||
|
||||
17
conf/site/node_modules/object.assign/test/tests.js
generated
vendored
17
conf/site/node_modules/object.assign/test/tests.js
generated
vendored
@@ -2,6 +2,7 @@
|
||||
|
||||
var hasSymbols = require('has-symbols/shams')();
|
||||
var forEach = require('for-each');
|
||||
var has = require('has');
|
||||
|
||||
module.exports = function (assign, t) {
|
||||
t.test('error cases', function (st) {
|
||||
@@ -34,7 +35,7 @@ module.exports = function (assign, t) {
|
||||
st.test('boolean', function (st2) {
|
||||
var bool = assign(true, { a: signal });
|
||||
st2.equal(typeof bool, 'object', 'bool is object');
|
||||
st.equal(Boolean.prototype.valueOf.call(bool), true, 'bool coerces to `true`');
|
||||
st2.equal(Boolean.prototype.valueOf.call(bool), true, 'bool coerces to `true`');
|
||||
st2.equal(bool.a, signal, 'source properties copied');
|
||||
st2.end();
|
||||
});
|
||||
@@ -103,6 +104,18 @@ module.exports = function (assign, t) {
|
||||
st.end();
|
||||
});
|
||||
|
||||
/* globals window */
|
||||
t.test('works with window.location', { skip: typeof window === 'undefined' }, function (st) {
|
||||
var target = {};
|
||||
assign(target, window.location);
|
||||
for (var prop in window.location) {
|
||||
if (has(window.location, prop)) {
|
||||
st.deepEqual(target[prop], window.location[prop], prop + ' is copied');
|
||||
}
|
||||
}
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('merge N objects', function (st) {
|
||||
var target = { a: 1 };
|
||||
var source1 = { b: 2 };
|
||||
@@ -146,7 +159,7 @@ module.exports = function (assign, t) {
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('does not fail when symbols are not present', function (st) {
|
||||
t.test('does not fail when symbols are not present', { skip: !Object.isFrozen || Object.isFrozen(Object) }, function (st) {
|
||||
var getSyms;
|
||||
if (hasSymbols) {
|
||||
getSyms = Object.getOwnPropertySymbols;
|
||||
|
||||
Reference in New Issue
Block a user