UNPKG

@gftdcojp/ksqldb-orm

Version:

ksqldb-orm - Server-Side TypeScript ORM for ksqlDB with enterprise security extensions

37 lines 1.29 kB
"use strict"; /** * @fileoverview テスト環境セットアップ * @description 全テスト実行前の共通設定 */ // 環境変数の設定(test用) process.env.GFTD_JWT_SECRET = 'test-jwt-secret-key-for-testing-purposes-with-sufficient-length-64-chars'; process.env.GFTD_LOG_LEVEL = 'error'; process.env.NODE_ENV = 'test'; process.env.GFTD_ALLOW_HTTP = 'true'; // ブラウザ環境モック Object.defineProperty(window, 'location', { value: { href: 'http://localhost:3000', origin: 'http://localhost:3000' }, writable: true }); // console.warnを無効化(テスト時の警告ログを抑制) const originalWarn = console.warn; console.warn = (...args) => { const message = args[0]; // セキュリティ警告以外は表示しない if (typeof message === 'string' && message.includes('SECURITY')) { originalWarn(...args); } }; // console.errorを無効化(テスト時のエラーログを抑制) const originalError = console.error; console.error = (...args) => { const message = args[0]; // テストの明示的なエラー以外は表示しない if (typeof message === 'string' && message.includes('Test Error')) { originalError(...args); } }; //# sourceMappingURL=setup.js.map