From 66ff9097a624c6df1f0e699cbe30f933d70d352c Mon Sep 17 00:00:00 2001 From: Corentin JOGUET Date: Thu, 7 May 2026 12:25:00 +0200 Subject: [PATCH] ops(ci): add vitest config + sanity tests stub - bridge/vitest.config.ts : config + coverage v8 + passWithNoTests - bridge/tests/unit/sanity.test.ts : stub (real tests Phase 2) - bridge/tests/integration/sanity.test.ts : stub - Remove tests/.gitkeep --- bridge/tests/.gitkeep | 0 bridge/tests/integration/sanity.test.ts | 11 +++++++++++ bridge/tests/unit/sanity.test.ts | 11 +++++++++++ bridge/vitest.config.ts | 22 ++++++++++++++++++++++ 4 files changed, 44 insertions(+) delete mode 100644 bridge/tests/.gitkeep create mode 100644 bridge/tests/integration/sanity.test.ts create mode 100644 bridge/tests/unit/sanity.test.ts create mode 100644 bridge/vitest.config.ts diff --git a/bridge/tests/.gitkeep b/bridge/tests/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/bridge/tests/integration/sanity.test.ts b/bridge/tests/integration/sanity.test.ts new file mode 100644 index 0000000..60dcca3 --- /dev/null +++ b/bridge/tests/integration/sanity.test.ts @@ -0,0 +1,11 @@ +import { describe, expect, it } from 'vitest'; + +describe('integration sanity', () => { + it('environment is reachable', () => { + expect(process.env.NODE_ENV).toBeDefined(); + }); + + it('placeholder for future Baserow + Redis integration tests', () => { + expect(true).toBe(true); + }); +}); diff --git a/bridge/tests/unit/sanity.test.ts b/bridge/tests/unit/sanity.test.ts new file mode 100644 index 0000000..d6dc744 --- /dev/null +++ b/bridge/tests/unit/sanity.test.ts @@ -0,0 +1,11 @@ +import { describe, expect, it } from 'vitest'; + +describe('sanity', () => { + it('node runtime is available', () => { + expect(process.version).toMatch(/^v\d+\./); + }); + + it('basic math works', () => { + expect(1 + 1).toBe(2); + }); +}); diff --git a/bridge/vitest.config.ts b/bridge/vitest.config.ts new file mode 100644 index 0000000..93a2a9f --- /dev/null +++ b/bridge/vitest.config.ts @@ -0,0 +1,22 @@ +import { defineConfig } from 'vitest/config'; + +export default defineConfig({ + test: { + globals: false, + environment: 'node', + include: ['tests/**/*.test.ts'], + coverage: { + provider: 'v8', + reporter: ['text', 'lcov', 'html'], + include: ['src/**/*.ts'], + exclude: ['src/**/*.test.ts', 'src/index.ts'], + thresholds: { + lines: 0, + functions: 0, + branches: 0, + statements: 0, + }, + }, + passWithNoTests: true, + }, +});