Skip to content

Commit 51304db

Browse files
committed
♻️ Refactor path utility creation in testhost.ts
Replaced inline createNodePath implementation with module import.
1 parent a879cac commit 51304db

1 file changed

Lines changed: 1 addition & 16 deletions

File tree

packages/core/src/testhost.ts

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,7 @@ import {
3636
import { defaultModelConfigurations } from "./llms"
3737
import { CancellationToken } from "./cancellation"
3838
import { changeext } from "./fs"
39-
40-
// Function to create a frozen object representing Node.js path methods
41-
// This object provides utility methods for path manipulations
42-
export function createNodePath(): Path {
43-
return Object.freeze({
44-
dirname,
45-
extname,
46-
basename,
47-
join,
48-
normalize,
49-
relative,
50-
resolve,
51-
isAbsolute,
52-
changeext,
53-
})
54-
}
39+
import { createNodePath } from "./path"
5540

5641
// Class representing a test host for runtime, implementing the RuntimeHost interface
5742
export class TestHost implements RuntimeHost {

0 commit comments

Comments
 (0)