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, + }, +});