mirror of
https://github.com/henrywhitaker3/Speedtest-Tracker.git
synced 2026-01-04 12:04:54 +01:00
Updated to v1.9.9
This commit is contained in:
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