From d66eaf116fa6b4f691ee646d814be6fbf27a5ec3 Mon Sep 17 00:00:00 2001 From: haelyra <49814733+haelyra@users.noreply.github.com> Date: Tue, 25 Aug 2026 12:55:02 -0400 Subject: [PATCH] test(opencode): canonicalize Windows path expectations --- tests/lib/install-targets.test.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/lib/install-targets.test.js b/tests/lib/install-targets.test.js index f8ddebf6a..121ed0753 100644 --- a/tests/lib/install-targets.test.js +++ b/tests/lib/install-targets.test.js @@ -655,18 +655,18 @@ function runTests() { OPENCODE_CONFIG_DIR: explicitRoot, }, }), - explicitRoot + path.resolve(explicitRoot) ); assert.strictEqual( adapter.resolveRoot({ homeDir, env: { XDG_CONFIG_HOME: xdgRoot } }), - path.join(xdgRoot, 'opencode') + path.join(path.resolve(xdgRoot), 'opencode') ); assert.strictEqual( adapter.getInstallStatePath({ homeDir, env: { OPENCODE_CONFIG_DIR: explicitRoot }, }), - path.join(explicitRoot, 'ecc-install-state.json') + path.join(path.resolve(explicitRoot), 'ecc-install-state.json') ); })) passed++; else failed++; @@ -691,7 +691,7 @@ function runTests() { assert.strictEqual(child.status, 0, child.stderr); assert.strictEqual( JSON.parse(child.stdout), - path.join(homeDir, '.config', 'opencode') + path.join(path.resolve(homeDir), '.config', 'opencode') ); })) passed++; else failed++; @@ -1139,10 +1139,10 @@ function runTests() { assert.strictEqual(adapter.id, 'opencode-home'); assert.strictEqual(adapter.target, 'opencode'); assert.strictEqual(adapter.kind, 'home'); - assert.strictEqual(root, path.join(homeDir, '.config', 'opencode')); + assert.strictEqual(root, path.join(path.resolve(homeDir), '.config', 'opencode')); assert.strictEqual( statePath, - path.join(homeDir, '.config', 'opencode', 'ecc-install-state.json') + path.join(path.resolve(homeDir), '.config', 'opencode', 'ecc-install-state.json') ); })) passed++; else failed++;