From 7cb545ee46a4d2dd5e1e508513dde013c567a4c1 Mon Sep 17 00:00:00 2001 From: Maximilian Skowron Date: Fri, 22 Nov 2024 15:18:58 +0100 Subject: [PATCH] test(*): fix integration tests to be compatible with 0.23.0-rc14 --- Dockerfile | 2 +- package.json | 3 ++- test/__snapshots__/fromJSON.test.ts.snap | 1 + test/integration/pb_data/data.db | Bin 233472 -> 233472 bytes test/pb_schema.json | 16 +++++++++++++++- test/pocketbase-types-example.ts | 1 + 6 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index af06f09..061c5b3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # Dockerfile to run e2e integration tests against a test PocketBase server FROM node:16-alpine3.16 -ARG POCKETBASE_VERSION=0.23.0-rc13 +ARG POCKETBASE_VERSION=0.23.0-rc14 WORKDIR /app/output/ WORKDIR /app/ diff --git a/package.json b/package.json index 54d64f6..79d3098 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,8 @@ "lint:fix": "npm run lint -- --fix", "prettier": "prettier src test --check", "prettier:fix": "npm run prettier -- --write", - "format": "npm run prettier:fix && npm run lint:fix" + "format": "npm run prettier:fix && npm run lint:fix", + "integration:local": "docker build . -t pocketbase-typegen:latest && docker run --name integration_test pocketbase-typegen:latest" }, "author": "@patmood", "license": "ISC", diff --git a/test/__snapshots__/fromJSON.test.ts.snap b/test/__snapshots__/fromJSON.test.ts.snap index ff93c8c..302c368 100644 --- a/test/__snapshots__/fromJSON.test.ts.snap +++ b/test/__snapshots__/fromJSON.test.ts.snap @@ -78,6 +78,7 @@ export type OtpsRecord = { id: string password: string recordRef: string + sentTo?: string updated?: IsoDateString } diff --git a/test/integration/pb_data/data.db b/test/integration/pb_data/data.db index cee21f5b31a2e3924dbb911d266fddf893ddf4b5..7c61f85f210d36114d7df0926cebb8d3c795ad5b 100644 GIT binary patch delta 859 zcmaJ_k((#uNOnAwAxq0{8bI#4ZnJGFm zMc;Rom;eBZasM6ZK^+fGFT0;20#VZ-XSF#Av`S6utnCU_Q*Fb2B;NVWF>)7WSL=@KyYX@5E+Oh4LPJYd0s%mFz?hqH@FHWya22%c)@V{ z0k_=g#_TngQb$gI?mtdwPnKa>F4JDD-CTvmbW$Bn^0Fi;vS_rE%XT@*ggTJ)$F$SS zuu?13;dL5a4=HV-5|UbC5G&P*js}Q0&dmyqEYm2+9$u95$DHs@n;D}w0ZP-GddZPb zG@ivV?dljTKmQlZHu8$ct8kqh!|{sR(1(|xgYVzggOOMQ_GLB8Lp7V25Hemkp{9)q{c7+L{n1#K7>-lIKsycTX_!?cZi z&|%j*VXMXXlytYyu-*R*JgVY4J6i2Q*mIEJC|PTJ%cZ!;c;175f2W#mCJNNeI@{F

fO>4E$A_1sw|br&rZ8b^!(6GVs3z3OweY{V4q&UlyUcFel}Ca_Wb3H+w+$*O}!zZ`uYgaQ z*M?V^=KxD2r!{v2`%RAZ9HKzS8?kH;X<^>X?7LcAT%57Ry(BRyC$%8IQQUxCR8^Iu zv9v5RwLHEgHMbx>(J3`3+X9*G9OUX4;;Inl=^Cz(fGjcnK?ig6_Vpdi=1kMiw=#2a mH96_BgDps&-qp<<$yS&bk)5J6S&>C%S`Rb#_J(fe1{MIiWQ?l- diff --git a/test/pb_schema.json b/test/pb_schema.json index b5eba4c..b5bf043 100644 --- a/test/pb_schema.json +++ b/test/pb_schema.json @@ -940,6 +940,20 @@ "presentable": false, "system": true, "type": "autodate" + }, + { + "autogeneratePattern": "", + "hidden": true, + "id": "text3866985172", + "max": 0, + "min": 0, + "name": "sentTo", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": true, + "type": "text" } ], "indexes": [ @@ -1407,4 +1421,4 @@ "system": false, "viewQuery": "select id, post_relation_field, text_field, json_field from everything" } -] +] \ No newline at end of file diff --git a/test/pocketbase-types-example.ts b/test/pocketbase-types-example.ts index 7c00c16..82bbf3d 100644 --- a/test/pocketbase-types-example.ts +++ b/test/pocketbase-types-example.ts @@ -75,6 +75,7 @@ export type OtpsRecord = { id: string password: string recordRef: string + sentTo?: string updated?: IsoDateString }