Comparing version 4.0.0-beta.4 to 4.0.0-beta.5
12
index.js
'use strict' | ||
const { deepStrictEqual } = require('assert').strict | ||
const { deepStrictEqual, notDeepStrictEqual } = require('assert').strict | ||
const checkChar = require('./cli-char-supported') | ||
@@ -263,2 +263,3 @@ const colorReset = `\u001b[0m` | ||
deepEqual: deepEqual(msg, f), | ||
notDeepEqual: notDeepEqual(msg, f), | ||
throws: throws(msg, f), | ||
@@ -324,2 +325,11 @@ notThrows: notThrows(msg, f), | ||
const notDeepEqual = (msg, f) => (a, b) => { | ||
return wrap( | ||
msg, | ||
() => notDeepStrictEqual(a, b) || true, | ||
`is deepEqual:\nA:\n${toPrint(a)}\nB:\n${toPrint(b)}`, | ||
f | ||
) | ||
} | ||
const throws = (msg, f) => (a) => { | ||
@@ -326,0 +336,0 @@ let threw |
{ | ||
"name": "mvt", | ||
"version": "4.0.0-beta.4", | ||
"version": "4.0.0-beta.5", | ||
"description": "A minimum viable testing framework, aka a few test helpers, 0 dependencies", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -69,3 +69,3 @@ # mvt [](https://npmjs.org/package/mvt) [](https://github.com/feross/standard) | ||
test('assert.false works', (assert) => assert.false(0)) | ||
test('assert.false works', (assert) => assert.false(false)) | ||
@@ -78,2 +78,4 @@ test('assert.truthy works', (assert) => assert.truthy(1)) | ||
test('assert.notDeepEqual works', (assert) => assert.notDeepEqual([2, 1], [1, 2])) | ||
test('assert.throws works', (assert) => { | ||
@@ -80,0 +82,0 @@ assert.throws(() => { throw new Error('it throws') }) |
16508
326
129