Cloud Functions 서버 기반과 앱 서버 연동 계층 — 계정 생성 트리거 · 약관 동의 기록 · 운영자 권한 · Admin 쓰기 관문 · Firestore·Functions 클라이언트 · 오류 코드 전달
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import { defineConfig } from 'vitest/config';
|
||||
import { existsSync } from 'node:fs';
|
||||
import { dirname, resolve } from 'node:path';
|
||||
|
||||
/**
|
||||
* NodeNext 규약대로 소스가 `./ledger.js` 로 임포트하지만 실제 파일은 `.ts` 다.
|
||||
* Vite 는 이 치환을 하지 않으므로 여기서 직접 이어 준다.
|
||||
*/
|
||||
const tsExtension = {
|
||||
name: 'resolve-js-to-ts',
|
||||
resolveId(source: string, importer?: string) {
|
||||
if (!importer || !source.startsWith('.') || !source.endsWith('.js')) return null;
|
||||
const candidate = resolve(dirname(importer), source.replace(/\.js$/, '.ts'));
|
||||
return existsSync(candidate) ? candidate : null;
|
||||
},
|
||||
};
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [tsExtension],
|
||||
test: {
|
||||
include: ['test/**/*.test.ts'],
|
||||
// 에뮬레이터 왕복이 있어 기본 5초로는 모자란다.
|
||||
testTimeout: 30_000,
|
||||
hookTimeout: 30_000,
|
||||
// 원장 테스트는 같은 사용자 문서를 건드리므로 순차로 돌린다.
|
||||
fileParallelism: false,
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user