MCPcopy
hub / github.com/prisma/prisma / testJSON

Method testJSON

sandbox/driver-adapters/src/test.ts:46–67  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

44 constructor(private readonly prisma: PrismaClient, readonly provider: SqlDriverAdapterFactory['provider']) {}
45
46 async testJSON() {
47 const json = JSON.stringify({
48 foo: 'bar',
49 baz: 1,
50 })
51
52 const created = await this.prisma.product.create({
53 data: {
54 properties: json,
55 },
56 select: {
57 properties: true,
58 },
59 })
60
61 console.log('[nodejs] created', superjson.serialize(created).json)
62
63 const resultSet = await this.prisma.product.findMany({})
64 console.log('[nodejs] resultSet', superjson.serialize(resultSet).json)
65
66 await this.prisma.product.deleteMany({})
67 }
68
69 async transactionsWithConflits() {
70 await this.prisma.leak_test.deleteMany()

Callers 1

smokeTestFunction · 0.95

Calls 4

logMethod · 0.80
serializeMethod · 0.80
findManyMethod · 0.80
createMethod · 0.45

Tested by

no test coverage detected