Skip to content

Commit 3a61869

Browse files
committed
fix: move tests
1 parent c75e37a commit 3a61869

File tree

8 files changed

+2635
-1710
lines changed

8 files changed

+2635
-1710
lines changed

.eslintrc.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module.exports = [
1717
languageOptions: {
1818
parser: tsParser,
1919
parserOptions: {
20-
project: ["./tsconfig.json"],
20+
project: ["./tsconfig.json", "./test/tsconfig.json"],
2121
},
2222
},
2323
plugins: {

package-lock.json

Lines changed: 2019 additions & 969 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/test/types.test.ts

Lines changed: 0 additions & 648 deletions
This file was deleted.

test/tsconfig.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"compilerOptions": {
3+
"module": "CommonJS",
4+
"target": "ES2022",
5+
"lib": ["ES2022", "DOM"],
6+
"rootDir": "..",
7+
"sourceMap": true,
8+
"strict": true,
9+
"esModuleInterop": true,
10+
"skipLibCheck": true,
11+
"resolveJsonModule": true,
12+
"types": ["node", "mocha"]
13+
},
14+
"include": ["unit/**/*.ts", "webview/**/*.ts", "mocks/**/*.ts", "../src/**/*.ts"],
15+
"exclude": ["../src/webview/**/*.ts"]
16+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as assert from "node:assert";
2-
import { normalizePathForOS } from "../utilities/normalizePath";
2+
import { normalizePathForOS } from "../../src/utilities/normalizePath";
33

44
describe("normalizePath.ts", () => {
55
describe("normalizePathForOS", () => {
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import * as assert from "node:assert";
22

33
/**
4-
* Tests for permalink generation logic used in codeMarker.ts:2577-2587
4+
* Tests for permalink generation logic used in codeMarker.ts:2595-2603
55
*
66
* The actual getRemoteAndPermalink method is tightly coupled to VS Code API.
77
* These tests verify the URL building logic and edge cases.
88
*/
99
describe("Permalink Generation Logic", () => {
1010
/**
1111
* Generates a permalink based on the remote URL, SHA, and location.
12-
* This mirrors the logic in codeMarker.ts:2577-2587
12+
* This mirrors the logic in codeMarker.ts:2595-2603
1313
*/
1414
function generatePermalink(gitRemote: string, sha: string, filePath: string, startLine: number, endLine: number): string {
15-
// Parse hostname - mirrors URL.parse(gitRemote)?.hostname in codeMarker.ts:2577
15+
// Parse hostname - mirrors URL.parse(gitRemote)?.hostname in codeMarker.ts:2595
1616
let remoteHost: string | null = null;
1717
try {
1818
remoteHost = new URL(gitRemote).hostname;

0 commit comments

Comments
 (0)