From fcef636899215f02f4e040230efe564a1ea12b37 Mon Sep 17 00:00:00 2001 From: Gianluca Date: Thu, 22 Oct 2020 14:29:26 +0100 Subject: [PATCH] fix: breaking snapshots --- .../cli/tests/__snapshots__/Cli.test.ts.snap | 68 ++++++++++++++++++- 1 file changed, 66 insertions(+), 2 deletions(-) diff --git a/packages/datastore/cli/tests/__snapshots__/Cli.test.ts.snap b/packages/datastore/cli/tests/__snapshots__/Cli.test.ts.snap index 291ba2c2b..1463c2328 100644 --- a/packages/datastore/cli/tests/__snapshots__/Cli.test.ts.snap +++ b/packages/datastore/cli/tests/__snapshots__/Cli.test.ts.snap @@ -21,7 +21,15 @@ export interface Comment { } export type CommentCreate = Omit; -export type CommentChange = Pick & Partial;" +export type CommentChange = Pick & Partial; +export interface Whatever { + _id: string; + _version: string; + _lastUpdatedAt: number +} + +export type WhateverCreate = Omit; +export type WhateverChange = Pick & Partial;" `; exports[`generate with defaults 2`] = ` @@ -98,6 +106,30 @@ exports[`generate with defaults 2`] = ` \\"isRequired\\": true } } + }, + \\"Whatever\\": { + \\"name\\": \\"Whatever\\", + \\"version\\": 1, + \\"type\\": \\"object\\", + \\"primaryKey\\": \\"_id\\", + \\"properties\\": { + \\"_id\\": { + \\"type\\": \\"string\\", + \\"key\\": \\"_id\\", + \\"isRequired\\": true, + \\"primary\\": true + }, + \\"_version\\": { + \\"type\\": \\"string\\", + \\"key\\": \\"_version\\", + \\"isRequired\\": true + }, + \\"_lastUpdatedAt\\": { + \\"type\\": \\"number\\", + \\"key\\": \\"_lastUpdatedAt\\", + \\"isRequired\\": true + } + } } }" `; @@ -131,7 +163,15 @@ export interface Comment { } export type CommentCreate = Omit; -export type CommentChange = Pick & Partial;" +export type CommentChange = Pick & Partial; +export interface Whatever { + _id: string; + _version: string; + _lastUpdatedAt: number +} + +export type WhateverCreate = Omit; +export type WhateverChange = Pick & Partial;" `; exports[`generate with positional arguments 2`] = ` @@ -208,6 +248,30 @@ exports[`generate with positional arguments 2`] = ` \\"isRequired\\": true } } + }, + \\"Whatever\\": { + \\"name\\": \\"Whatever\\", + \\"version\\": 1, + \\"type\\": \\"object\\", + \\"primaryKey\\": \\"_id\\", + \\"properties\\": { + \\"_id\\": { + \\"type\\": \\"string\\", + \\"key\\": \\"_id\\", + \\"isRequired\\": true, + \\"primary\\": true + }, + \\"_version\\": { + \\"type\\": \\"string\\", + \\"key\\": \\"_version\\", + \\"isRequired\\": true + }, + \\"_lastUpdatedAt\\": { + \\"type\\": \\"number\\", + \\"key\\": \\"_lastUpdatedAt\\", + \\"isRequired\\": true + } + } } }" `;