mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 12:15:57 +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 {
|
||||
getConfigPathForPort,
|
||||
getConfigPath,
|
||||
getCliproxyConfigPath,
|
||||
generateConfig,
|
||||
regenerateConfig,
|
||||
configExists,
|
||||
@@ -98,9 +98,9 @@ describe('Config Generator Port', function () {
|
||||
});
|
||||
});
|
||||
|
||||
describe('getConfigPath', function () {
|
||||
describe('getCliproxyConfigPath', function () {
|
||||
it('returns path for default port', function () {
|
||||
const configPath = getConfigPath();
|
||||
const configPath = getCliproxyConfigPath();
|
||||
const defaultPath = getConfigPathForPort(CLIPROXY_DEFAULT_PORT);
|
||||
assert.strictEqual(configPath, defaultPath);
|
||||
});
|
||||
|
||||
@@ -362,7 +362,7 @@ auth-dir: "/test"
|
||||
let testDir;
|
||||
let originalCcsHome;
|
||||
let regenerateConfig;
|
||||
let getConfigPath;
|
||||
let getCliproxyConfigPath;
|
||||
|
||||
beforeEach(() => {
|
||||
// Create a temporary test directory
|
||||
@@ -375,7 +375,7 @@ auth-dir: "/test"
|
||||
delete require.cache[require.resolve('../../../dist/utils/config-manager')];
|
||||
const configGenerator = require('../../../dist/cliproxy/config-generator');
|
||||
regenerateConfig = configGenerator.regenerateConfig;
|
||||
getConfigPath = configGenerator.getConfigPath;
|
||||
getCliproxyConfigPath = configGenerator.getCliproxyConfigPath;
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
|
||||
Reference in New Issue
Block a user