feat(ci): add husky pre-commit hook and fix puppeteer-core chrome detection
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
|
||||
import { loadAutomationConfig, AutomationMode } from '../../../src/infrastructure/config/AutomationConfig';
|
||||
import { loadAutomationConfig, AutomationMode } from '../../../packages/infrastructure/config/AutomationConfig';
|
||||
|
||||
describe('AutomationConfig', () => {
|
||||
const originalEnv = process.env;
|
||||
@@ -16,12 +16,12 @@ describe('AutomationConfig', () => {
|
||||
|
||||
describe('loadAutomationConfig', () => {
|
||||
describe('default configuration', () => {
|
||||
it('should return mock mode when AUTOMATION_MODE is not set', () => {
|
||||
it('should return dev mode when AUTOMATION_MODE is not set', () => {
|
||||
delete process.env.AUTOMATION_MODE;
|
||||
|
||||
const config = loadAutomationConfig();
|
||||
|
||||
expect(config.mode).toBe('mock');
|
||||
expect(config.mode).toBe('dev');
|
||||
});
|
||||
|
||||
it('should return default devTools configuration', () => {
|
||||
@@ -161,12 +161,12 @@ describe('AutomationConfig', () => {
|
||||
expect(config.nutJs?.confidence).toBe(0.9);
|
||||
});
|
||||
|
||||
it('should fallback to mock mode for invalid AUTOMATION_MODE', () => {
|
||||
it('should fallback to dev mode for invalid AUTOMATION_MODE', () => {
|
||||
process.env.AUTOMATION_MODE = 'invalid-mode';
|
||||
|
||||
const config = loadAutomationConfig();
|
||||
|
||||
expect(config.mode).toBe('mock');
|
||||
expect(config.mode).toBe('dev');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user