Skip to content

Commit 75e27bf

Browse files
authored
[INTERNAL] JSModuleAnalyzer: Remove invalid log usage (#354)
Change usage from non existing log.debug to log.verbose In JSModuleAnalyzer test the analyzeModule function will fail if there is an error.
1 parent b2d8269 commit 75e27bf

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

lib/lbt/analyzer/JSModuleAnalyzer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,11 +270,11 @@ class JSModuleAnalyzer {
270270
if ( comment.value.startsWith("@ui5-bundle-raw-include ") ) {
271271
const subModule = comment.value.slice("@ui5-bundle-raw-include ".length);
272272
info.addSubModule(subModule);
273-
log.debug(`bundle include directive ${subModule}`);
273+
log.verbose(`bundle include directive ${subModule}`);
274274
} else if ( comment.value.startsWith("@ui5-bundle ") ) {
275275
const bundleName = comment.value.slice("@ui5-bundle ".length);
276276
setMainModuleInfo(bundleName, null);
277-
log.debug(`bundle name directive ${bundleName}`);
277+
log.verbose(`bundle name directive ${bundleName}`);
278278
} else {
279279
log.warn(`unrecognized bundle directive ${comment.value}`);
280280
}

test/lib/lbt/analyzer/JSModuleAnalyzer.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ function analyzeModule(
9494
expectedSubmodules,
9595
"submodules should match");
9696
}
97-
}).then(() => t.end(), () => t.end());
97+
}).then(() => t.end(), (e) => t.fail(`failed to analyze module with error: ${e.message}`));
9898
}
9999

100100
test.cb("DeclareToplevel", analyzeModule, "modules/declare_toplevel.js", EXPECTED_MODULE_NAME, EXPECTED_DECLARE_DEPENDENCIES);
@@ -287,8 +287,6 @@ test.cb("OldStyleBundleV2", (t) => {
287287
);
288288
});
289289

290-
// Note: this test still fails as the evo-style bundles don't declare the names of the
291-
// contained raw-modules any longer.
292290
test.cb("EvoBundle", (t) => {
293291
analyzeModule(t,
294292
"modules/bundle-evo.js",

0 commit comments

Comments
 (0)