From c4fd5a36a9a14836be0d36dfc7022297fa5d6cdb Mon Sep 17 00:00:00 2001 From: jkvyff Date: Mon, 9 Dec 2019 20:36:45 -0800 Subject: [PATCH] add missing brackets and update incorrect values in tests --- src/objects/invert.spec.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/objects/invert.spec.js b/src/objects/invert.spec.js index 17415a4..b84eacd 100644 --- a/src/objects/invert.spec.js +++ b/src/objects/invert.spec.js @@ -2,20 +2,20 @@ import test from 'tape'; import { objects } from '../../index.js'; test('objects.invert(object) - returns an object with key-value pairs inverted', t => { - const expect = { 4: 'horses', 19: 'your', 25: 'horses' }; + const expect = { 4: 'horses', 19: 'your', 25: 'hold' }; const result = objects.invert({ hold: 25, your: 19, horses: 4 }); - t.equal(Object.prototype.toString.call(result), '[object Object', 'return type'); + t.equal(Object.prototype.toString.call(result), '[object Object]', 'return type'); t.deepEqual(result, expect, 'output value'); t.end(); }); test('objects.invert(object) - returns an object with key-value pairs inverted', t => { - const expect = { 0: 'lights', 1: 'camera', 2: 'action' }; + const expect = { lights: '0', camera: '1', action: '2' }; const result = objects.invert(['lights', 'camera', 'action']); - t.equal(Object.prototype.toString.call(result), '[object Object', 'return type'); + t.equal(Object.prototype.toString.call(result), '[object Object]', 'return type'); t.deepEqual(result, expect, 'output value'); t.end(); @@ -25,7 +25,7 @@ test('objects.invert(object) - returns an object inverted with duplicate values const expect = { small: '9', big: '80' }; const result = objects.invert({ 80: 'big', 4: 'small', 9: 'small' }); - t.equal(Object.prototype.toString.call(result), '[object Object', 'return type'); + t.equal(Object.prototype.toString.call(result), '[object Object]', 'return type'); t.deepEqual(result, expect, 'output value'); t.end(); @@ -35,7 +35,7 @@ test('objects.invert(object) - returns an empty object if there are no items in const expect = {}; const result = objects.invert({}); - t.equal(Object.prototype.toString.call(result), '[object Object', 'return type'); + t.equal(Object.prototype.toString.call(result), '[object Object]', 'return type'); t.deepEqual(result, expect, 'output value'); t.end();