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
This commit is contained in:
parent
991d172f69
commit
66ff9097a6
4 changed files with 44 additions and 0 deletions
11
bridge/tests/integration/sanity.test.ts
Normal file
11
bridge/tests/integration/sanity.test.ts
Normal file
|
|
@ -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);
|
||||||
|
});
|
||||||
|
});
|
||||||
11
bridge/tests/unit/sanity.test.ts
Normal file
11
bridge/tests/unit/sanity.test.ts
Normal file
|
|
@ -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);
|
||||||
|
});
|
||||||
|
});
|
||||||
22
bridge/vitest.config.ts
Normal file
22
bridge/vitest.config.ts
Normal file
|
|
@ -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,
|
||||||
|
},
|
||||||
|
});
|
||||||
Loading…
Add table
Reference in a new issue