mirror of
https://github.com/tiennm99/ccs.git
synced 2026-08-08 02:24:14 +00:00
fix(tests): update test files for renamed getCliproxyConfigPath function
Update tests to use renamed function after refactoring getConfigPath to getCliproxyConfigPath in cliproxy/config-generator.ts Files updated: - tests/unit/cliproxy/config-generator-port.test.js - tests/unit/cliproxy/config-generator.test.js
This commit is contained in:
@@ -19,7 +19,7 @@ process.env.CCS_HOME = testHome;
|
|||||||
|
|
||||||
const {
|
const {
|
||||||
getConfigPathForPort,
|
getConfigPathForPort,
|
||||||
getConfigPath,
|
getCliproxyConfigPath,
|
||||||
generateConfig,
|
generateConfig,
|
||||||
regenerateConfig,
|
regenerateConfig,
|
||||||
configExists,
|
configExists,
|
||||||
@@ -98,9 +98,9 @@ describe('Config Generator Port', function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('getConfigPath', function () {
|
describe('getCliproxyConfigPath', function () {
|
||||||
it('returns path for default port', function () {
|
it('returns path for default port', function () {
|
||||||
const configPath = getConfigPath();
|
const configPath = getCliproxyConfigPath();
|
||||||
const defaultPath = getConfigPathForPort(CLIPROXY_DEFAULT_PORT);
|
const defaultPath = getConfigPathForPort(CLIPROXY_DEFAULT_PORT);
|
||||||
assert.strictEqual(configPath, defaultPath);
|
assert.strictEqual(configPath, defaultPath);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -362,7 +362,7 @@ auth-dir: "/test"
|
|||||||
let testDir;
|
let testDir;
|
||||||
let originalCcsHome;
|
let originalCcsHome;
|
||||||
let regenerateConfig;
|
let regenerateConfig;
|
||||||
let getConfigPath;
|
let getCliproxyConfigPath;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
// Create a temporary test directory
|
// Create a temporary test directory
|
||||||
@@ -375,7 +375,7 @@ auth-dir: "/test"
|
|||||||
delete require.cache[require.resolve('../../../dist/utils/config-manager')];
|
delete require.cache[require.resolve('../../../dist/utils/config-manager')];
|
||||||
const configGenerator = require('../../../dist/cliproxy/config-generator');
|
const configGenerator = require('../../../dist/cliproxy/config-generator');
|
||||||
regenerateConfig = configGenerator.regenerateConfig;
|
regenerateConfig = configGenerator.regenerateConfig;
|
||||||
getConfigPath = configGenerator.getConfigPath;
|
getCliproxyConfigPath = configGenerator.getCliproxyConfigPath;
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user