Skip to content

Commit

Permalink
test adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
mmews committed Dec 18, 2023
1 parent ec9d8c8 commit 15ee447
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class C extends D {}
"(Error, [0:18 - 0:21], Cannot resolve plain module specifier (without project name as first segment): no matching module found.)",
"(Error, [1:16 - 1:17], Couldn't resolve reference to Type 'D'.)")),
Pair.of("multiProjectTest.first/package.json", List.of(
"(Error, [17:8 - 17:27], Project does not exist with project ID: thirdProject.)")));
"(Error, [18:8 - 18:27], Project does not exist with project ID: thirdProject.)")));

FileURI fileURI = toFileURI(getProjectLocation().toPath().resolve("thirdProject"));
fileURI.appendSegment("src").toFile().mkdirs();
Expand Down Expand Up @@ -199,7 +199,7 @@ export public class D {}
joinServerRequests();
assertIssues2(
Pair.of("multiProjectTest.first/package.json", List.of(
"(Error, [16:3 - 16:32], Project does not exist with project ID: multiProjectTest.second.)")),
"(Error, [14:18 - 14:47], Project does not exist with project ID: multiProjectTest.second.)")),
Pair.of("C", List.of(
"(Error, [0:18 - 0:21], Cannot resolve plain module specifier (without project name as first segment): no matching module found.)",
"(Error, [1:16 - 1:17], Couldn't resolve reference to Type 'D'.)")));
Expand Down Expand Up @@ -266,21 +266,21 @@ public void testChangeProjectTypeWithoutOpenedEditors() {
joinServerRequests();
assertIssues2(
Pair.of(PROJECT1_NAME + "/package.json", List.of(
"(Warning, [7:58 - 7:83], Project multiProjectTest.second of type library cannot be declared among the required runtime libraries.)")));
"(Warning, [8:58 - 8:83], Project multiProjectTest.second of type library cannot be declared among the required runtime libraries.)")));

changeNonOpenedFile(toFileURI(getPackageJsonFile(PROJECT2_NAME)),
Pair.of("\"projectType\": \"library\"", "\"projectType\": \"runtimeLibrary\""));
joinServerRequests();
assertIssues2(
Pair.of(PROJECT2_NAME + "/package.json", List.of(
"(Warning, [16:3 - 16:21], Project n4js-runtime of type runtime environment cannot be declared among the dependencies or devDependencies.)")));
"(Warning, [14:18 - 14:36], Project n4js-runtime of type runtime environment cannot be declared among the dependencies or devDependencies.)")));

changeNonOpenedFile(toFileURI(getPackageJsonFile(PROJECT2_NAME)),
Pair.of("\"projectType\": \"runtimeLibrary\"", "\"projectType\": \"library\""));
joinServerRequests();
assertIssues2(
Pair.of(PROJECT1_NAME + "/package.json", List.of(
"(Warning, [7:58 - 7:83], Project multiProjectTest.second of type library cannot be declared among the required runtime libraries.)")));
"(Warning, [8:58 - 8:83], Project multiProjectTest.second of type library cannot be declared among the required runtime libraries.)")));
}

@Test
Expand All @@ -299,7 +299,7 @@ class C {}
joinServerRequests();
assertIssues2(
Pair.of(PROJECT1_NAME + "/package.json", List.of(
"(Warning, [9:30 - 9:35], Source container path ext does not exist.)")));
"(Warning, [10:29 - 10:34], Source container path ext does not exist.)")));

File extFolder = getProjectRoot(PROJECT1_NAME).toPath().resolve("ext").toFile();
Assert.assertTrue("External folder 'ext' should be missing", !extFolder.exists());
Expand All @@ -320,7 +320,7 @@ class C {}
cleanBuildAndWait();
assertIssues2(
Pair.of(PROJECT1_NAME + "/package.json", List.of(
"(Warning, [9:30 - 9:35], Source container path ext does not exist.)")));
"(Warning, [10:29 - 10:34], Source container path ext does not exist.)")));
}

private void addSecondProjectToDependencies() throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export public class Shadow {}

assertIssues2(
Pair.of(DEFAULT_PROJECT_NAME + "/package.json", List.of(
"(Error, [7:69 - 7:79], Module filters of type noValidate must not match N4JS modules/files.)")));
"(Error, [8:69 - 8:79], Module filters of type noValidate must not match N4JS modules/files.)")));
assertEquals("file package.json should have 1 marker since the module filter is invalid", 1,
getIssuesInFile(packageJsonFileURI).size());
assertEquals("file src/js/Shadowed.js should have 0 markers", 0, getIssuesInFile(fileImpl).size());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ class C extends D {}

assertIssues2(
Pair.of(DEFAULT_PROJECT_NAME + "/package.json", List.of(
"(Warning, [12:16 - 12:22], Source container path src3 does not exist.)")),
"(Warning, [13:16 - 13:22], Source container path src3 does not exist.)")),
Pair.of("C", List.of(
"(Error, [0:18 - 0:21], Cannot resolve plain module specifier (without project name as first segment): no matching module found.)",
"(Error, [1:16 - 1:17], Couldn't resolve reference to Type 'D'.)")));
Expand Down

0 comments on commit 15ee447

Please sign in to comment.