🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →

easily-expect

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

easily-expect - npm Package Compare versions

Comparing version

to
1.0.1

'use strict'
const { expect } = require('chai')
const { deepEqual } = require('easily-js')
let cacheData = {}

@@ -23,3 +24,3 @@ exports.checkType = (dataType, ...objects) => {

for (let object of objects) {
if (!Array.isArray(object) && typeof object === 'object') expect(JSON.stringify(object)).to.equal(JSON.stringify(data))
if (!Array.isArray(object) && typeof object === 'object' && object !== null) expect(deepEqual(object, data)).to.equal(true)
else expect(object).to.equal(data)

@@ -26,0 +27,0 @@ }

{
"name": "easily-expect",
"version": "1.0.0",
"version": "1.0.1",
"description": "You can easily use expect",

@@ -26,2 +26,3 @@ "main": "index.js",

"chai": "^4.1.2",
"easily-js": "^1.0.2",
"fs": "0.0.1-security",

@@ -28,0 +29,0 @@ "mocha-better-spec-reporter": "^3.1.0",

@@ -15,2 +15,5 @@ /* global describe, it */

})
it('Object Type Test', () => {
checkEqual({ a: 1 }, { a: 1 }/* , { a: 1 } */)
})
it('null Type Test', () => {

@@ -17,0 +20,0 @@ checkEqual(null, null/* , NaN */)