Skip to content

Commit fd01941

Browse files
author
Arvid Paeglit
committed
fixed file paths in tests
1 parent cb43b4a commit fd01941

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

src/test/suite/extension.test.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const testToken = "TEST_TOKEN";
1919
const testBundleId = "testBundleId";
2020
const mockedTestFilesDirPath = __dirname.replace("out/test", "src/test");
2121
const mockedFolderPath = vscode.Uri.parse(
22-
"scheme:" + path.join(mockedTestFilesDirPath, "../mocked_data"),
22+
"scheme:" + path.join(mockedTestFilesDirPath, "/../mocked_data"),
2323
true
2424
).fsPath;
2525

@@ -81,12 +81,12 @@ const uri = vscode.Uri.file(
8181
path.join(mockedTestFilesDirPath, "../mocked_data/sample_repository", "main.js"),
8282
);
8383

84-
const testIgnoreComment = '// deepcode ignore UseStrictEquality: <please specify a reason of ignoring this>';
84+
const testIgnoreComment = ' // deepcode ignore UseStrictEquality: <please specify a reason of ignoring this>\n';
8585
const testFilesList = [
86-
'../mocked_data/sample_repository/utf8.js',
87-
'../mocked_data/sample_repository/main.js',
88-
'../mocked_data/sample_repository/sub_folder/test2.js',
89-
'../mocked_data/test.java',
86+
'/../mocked_data/sample_repository/utf8.js',
87+
'/../mocked_data/sample_repository/main.js',
88+
'/../mocked_data/sample_repository/sub_folder/test2.js',
89+
'/../mocked_data/test.java',
9090
];
9191

9292
suite("Deepcode Extension Tests", () => {
@@ -115,7 +115,9 @@ suite("Deepcode Extension Tests", () => {
115115
return editor.edit(textEditor => {
116116
textEditor.insert(new vscode.Position(18, 0), testIgnoreComment);
117117
}).then(inserted => {
118-
assert.equal(document.lineAt(18).text, testIgnoreComment);
118+
assert.equal(`${document.lineAt(18).text}\n`, testIgnoreComment);
119+
// TODO: find a way to undo this change
120+
// TODO: check actual analysis results with ignored line
119121
});
120122
});
121123

0 commit comments

Comments
 (0)