Skip to content

Commit 0f01f22

Browse files
committed
[INTERNAL] Specification: Fix tests based on UI5 FS changes
1 parent 836e2cc commit 0f01f22

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

test/lib/specifications/Specification.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,10 @@ test("_dirExists: Directory exists", async (t) => {
135135

136136
test("_dirExists: Missing leading slash", async (t) => {
137137
const project = await Specification.create(t.context.basicProjectInput);
138-
const bExists = await project._dirExists("webapp");
139-
t.false(bExists, "directory is not found");
138+
139+
await t.throwsAsync(project._dirExists("webapp"), {
140+
message: "Failed to resolve virtual path 'webapp': Path must be absolute"
141+
});
140142
});
141143

142144
test("_dirExists: Trailing slash is ok", async (t) => {
@@ -148,8 +150,9 @@ test("_dirExists: Trailing slash is ok", async (t) => {
148150
test("_dirExists: Directory is a file", async (t) => {
149151
const project = await Specification.create(t.context.basicProjectInput);
150152

151-
const bExists = await project._dirExists("webapp/index.html");
152-
t.false(bExists, "directory is a file");
153+
await t.throwsAsync(project._dirExists("webapp/index.html"), {
154+
message: "Failed to resolve virtual path 'webapp/index.html': Path must be absolute"
155+
});
153156
});
154157

155158
test("_dirExists: Directory does not exist", async (t) => {

0 commit comments

Comments
 (0)