@tapjs/snapshot
Advanced tools
Comparing version 0.0.0-2 to 0.0.0-3
@@ -5,7 +5,7 @@ "use strict"; | ||
const core_1 = require("@tapjs/core"); | ||
const is_actual_promise_1 = require("is-actual-promise"); | ||
const path_1 = require("path"); | ||
const tcompare_1 = require("tcompare"); | ||
const trivial_deferred_1 = require("trivial-deferred"); | ||
const provider_js_1 = require("./provider.js"); | ||
const tcompare_1 = require("tcompare"); | ||
const isPromise = (p) => !!p && typeof p === 'object' && typeof p.then === 'function'; | ||
const defaultFormatSnapshot = (co = {}) => (obj) => (0, tcompare_1.format)(obj, { sort: true, ...co }); | ||
@@ -171,3 +171,3 @@ const plugin = (t, opts = {}) => new SnapshotPlugin(t, opts); | ||
} | ||
if (!isPromise(p)) { | ||
if (!(0, is_actual_promise_1.isPromise)(p)) { | ||
return this.#t.fail('no promise or async function provided to t.resolveMatchSnapshot'); | ||
@@ -174,0 +174,0 @@ } |
import { argv, cwd, env, mainScript, normalizeMessageExtra, } from '@tapjs/core'; | ||
import { isPromise } from 'is-actual-promise'; | ||
import { relative, resolve } from 'path'; | ||
import { format, strict } from 'tcompare'; | ||
import { Deferred } from 'trivial-deferred'; | ||
import { SnapshotProviderDefault } from './provider.js'; | ||
import { format, strict } from 'tcompare'; | ||
const isPromise = (p) => !!p && typeof p === 'object' && typeof p.then === 'function'; | ||
const defaultFormatSnapshot = (co = {}) => (obj) => format(obj, { sort: true, ...co }); | ||
@@ -8,0 +8,0 @@ export const plugin = (t, opts = {}) => new SnapshotPlugin(t, opts); |
{ | ||
"name": "@tapjs/snapshot", | ||
"version": "0.0.0-2", | ||
"version": "0.0.0-3", | ||
"description": "", | ||
@@ -41,5 +41,6 @@ "author": "Isaac Z. Schlueter <i@izs.me> (https://blog.izs.me)", | ||
"peerDependencies": { | ||
"@tapjs/core": "0.0.0-2" | ||
"@tapjs/core": "0.0.0-3" | ||
}, | ||
"dependencies": { | ||
"is-actual-promise": "^1.0.0", | ||
"tcompare": "6.0.1-1", | ||
@@ -46,0 +47,0 @@ "trivial-deferred": "^2.0.0" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
80352
4
+ Addedis-actual-promise@^1.0.0
+ Added@tapjs/core@0.0.0-3(transitive)
+ Added@tapjs/test@0.0.0-3(transitive)
+ Addedis-actual-promise@1.0.2(transitive)
- Removed@tapjs/core@0.0.0-2(transitive)
- Removed@tapjs/test@0.0.0-2(transitive)