prisma-mock
Advanced tools
Comparing version 0.5.3 to 0.5.4
@@ -32,2 +32,3 @@ "use strict"; | ||
const deepEqual_1 = require("./utils/deepEqual"); | ||
const deepCopy_1 = require("./utils/deepCopy"); | ||
function IsFieldDefault(f) { | ||
@@ -139,6 +140,17 @@ return f.name !== undefined; | ||
const res = []; | ||
for (const action of actions) { | ||
res.push(await action); | ||
if (Array.isArray(actions)) { | ||
for (const action of actions) { | ||
res.push(await action); | ||
} | ||
return res; | ||
} | ||
return res; | ||
else { | ||
const snapshot = (0, deepCopy_1.deepCopy)(data); | ||
try { | ||
await actions(client); | ||
} | ||
catch { | ||
data = snapshot; | ||
} | ||
} | ||
}); | ||
@@ -145,0 +157,0 @@ client["$connect"].mockImplementation(async () => { }); |
{ | ||
"name": "prisma-mock", | ||
"version": "0.5.3", | ||
"version": "0.5.4", | ||
"description": "Mock prisma for unit testing database", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -208,3 +208,3 @@ # Prisma Mock | ||
- $transaction | ||
- TODO: $transaction (interactive) | ||
- $transaction (interactive) | ||
- TODO: $transaction (isolation) | ||
@@ -211,0 +211,0 @@ |
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
59398
19
1201