Skip to content

Commit 35f3249

Browse files
committed
Replaced Object.assign
1 parent 4e9825b commit 35f3249

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/v1/tck/steps/steps.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,10 @@ module.exports = function () {
108108
});
109109

110110
this.When(/^adding a copy of map M to map M$/, function () {
111-
var copyt_of_map = Object.assign({}, this.M);
112-
this.M["a" + sizeOfObject(this.M)] = copyt_of_map;
111+
var copyt_of_map = {}
112+
for(var key in this.M) {
113+
copyt_of_map[key] = this.M[key]
114+
}
113115
});
114116

115117
this.When(/^the driver asks the server to echo this value back$/, function () {
@@ -256,7 +258,7 @@ module.exports = function () {
256258
if (sizeOfObject(one) != sizeOfObject(other)) return false;
257259
for (var i = 0; i < one.length; ++i) {
258260
if (!compareValues(one[i], other[i])) {
259-
console.log("Miss-match at index: [" + i + "] Values should be same but was : [" + one[i] +"] and : [" + other[i] + "]");
261+
console.log("Mismatch at index: [" + i + "] Values should be same but was : [" + one[i] +"] and : [" + other[i] + "]");
260262
return false;
261263
}
262264
}
@@ -268,7 +270,7 @@ module.exports = function () {
268270
for (var key in one) {
269271
if (typeof other[key] == "undefined") return false;
270272
if (!compareValues(one[key], other[key])) {
271-
console.log("Miss-match at key: [" + key + "] Values should be same but was : [" + one[key] +"] and : [" + other[key] + "]");
273+
console.log("Mismatch at key: [" + key + "] Values should be same but was : [" + one[key] +"] and : [" + other[key] + "]");
272274
return false;
273275
}
274276
}

0 commit comments

Comments
 (0)