From 1ec2d0020825124c0a955116fc487df3314c3d93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=AB=E9=9B=A8=E6=B0=B4=E8=BF=87=E6=BB=A4=E7=9A=84?= =?UTF-8?q?=E7=A9=BA=E6=B0=94-Rain?= <958414905@qq.com> Date: Fri, 27 Oct 2023 16:54:11 +0800 Subject: [PATCH] feat(e2e): add test.pgOnly (#2923) --- packages/core/test/src/client/e2eUtils.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/core/test/src/client/e2eUtils.ts b/packages/core/test/src/client/e2eUtils.ts index d362040a05..1311369d8d 100644 --- a/packages/core/test/src/client/e2eUtils.ts +++ b/packages/core/test/src/client/e2eUtils.ts @@ -165,7 +165,7 @@ class NocoPage { } } -export const test = base.extend<{ +const _test = base.extend<{ mockPage: (config?: PageConfig) => NocoPage; createCollections: (collectionSettings: CollectionSetting | CollectionSetting[]) => Promise; }>({ @@ -206,6 +206,11 @@ export const test = base.extend<{ }, }); +export const test = Object.assign(_test, { + /** 只运行在 postgres 数据库中 */ + pgOnly: process.env.DB_DIALECT == 'postgres' ? _test : _test.skip, +}); + const getStorageItem = (key: string, storageState: any) => { return storageState.origins .find((item) => item.origin === `http://localhost:${process.env.APP_PORT}`)