mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-02 20:43:36 +00:00
refactor: improve secure-fs throttling configuration and add unit tests
- Enhanced the configureThrottling function to prevent changes to maxConcurrency while operations are in flight. - Added comprehensive unit tests for secure-fs throttling and retry logic, ensuring correct behavior and configuration. - Removed outdated secure-fs test file and replaced it with a new, updated version to improve test coverage.
This commit is contained in:
@@ -130,7 +130,7 @@ describe('node-finder', () => {
|
||||
const delimiter = path.delimiter;
|
||||
|
||||
it("should return current path unchanged when nodePath is 'node'", () => {
|
||||
const currentPath = '/usr/bin:/usr/local/bin';
|
||||
const currentPath = `/usr/bin${delimiter}/usr/local/bin`;
|
||||
const result = buildEnhancedPath('node', currentPath);
|
||||
|
||||
expect(result).toBe(currentPath);
|
||||
@@ -144,7 +144,7 @@ describe('node-finder', () => {
|
||||
|
||||
it('should prepend node directory to path', () => {
|
||||
const nodePath = '/opt/homebrew/bin/node';
|
||||
const currentPath = '/usr/bin:/usr/local/bin';
|
||||
const currentPath = `/usr/bin${delimiter}/usr/local/bin`;
|
||||
|
||||
const result = buildEnhancedPath(nodePath, currentPath);
|
||||
|
||||
@@ -153,7 +153,7 @@ describe('node-finder', () => {
|
||||
|
||||
it('should not duplicate node directory if already in path', () => {
|
||||
const nodePath = '/usr/local/bin/node';
|
||||
const currentPath = '/usr/local/bin:/usr/bin';
|
||||
const currentPath = `/usr/local/bin${delimiter}/usr/bin`;
|
||||
|
||||
const result = buildEnhancedPath(nodePath, currentPath);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user