prisma-mock
Advanced tools
Comparing version 0.0.9 to 0.0.10
@@ -82,2 +82,3 @@ "use strict"; | ||
model.fields.forEach(field => { | ||
d; //? | ||
if (d[field.name] && field.kind === 'object') { | ||
@@ -116,3 +117,8 @@ const c = d[field.name]; | ||
else { | ||
delegate.create(Object.assign(Object.assign({}, create.create), { data: map(create.create) })); | ||
if (Array.isArray(c.create)) { | ||
delegate.createMany(Object.assign(Object.assign({}, c.create), { data: c.create.map(map) })); | ||
} | ||
else { | ||
delegate.create(Object.assign(Object.assign({}, create.create), { data: map(create.create) })); | ||
} | ||
} | ||
@@ -288,2 +294,3 @@ } | ||
data = Object.assign(Object.assign({}, data), { [prop]: [...data[prop], d] }); | ||
data; //? | ||
data = checkIds(model, data); | ||
@@ -290,0 +297,0 @@ return findOne(Object.assign({ where: { id: d.id } }, args)); |
{ | ||
"name": "prisma-mock", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"description": "Mock prisma for unit testing database", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
19126
396