Skip to content

Commit 3f05917

Browse files
committed
[INTERNAL] index.js: Fix export and add tests
1 parent ccb9af4 commit 3f05917

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,26 @@ const modules = {
1111
* @namespace
1212
*/
1313
ui5Framework: {
14-
Openui5Resolver: require("./lib/ui5Framework/Openui5Resolver"),
15-
Sapui5Resolver: require("./lib/ui5Framework/Sapui5Resolver")
14+
Openui5Resolver: "./lib/ui5Framework/Openui5Resolver",
15+
Sapui5Resolver: "./lib/ui5Framework/Sapui5Resolver"
1616
},
1717
/**
1818
* @public
1919
* @see module:@ui5/project.validation
2020
* @namespace
2121
*/
2222
validation: {
23-
validator: require("./lib/validation/validator"),
24-
ValidationError: require("./lib/validation/ValidationError")
23+
validator: "./lib/validation/validator",
24+
ValidationError: "./lib/validation/ValidationError"
2525
},
2626
/**
2727
* @private
2828
* @see module:@ui5/project.translators
2929
* @namespace
3030
*/
3131
translators: {
32-
"npm": "./lib/translators/npm",
33-
"static": "./lib/translators/static"
32+
npm: "./lib/translators/npm",
33+
static: "./lib/translators/static"
3434
}
3535
};
3636

test/lib/index.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
const test = require("ava");
2+
const index = require("../../index");
3+
4+
test("index.js exports all expected modules", (t) => {
5+
t.truthy(index.normalizer, "Module exported");
6+
t.truthy(index.projectPreprocessor, "Module exported");
7+
8+
t.truthy(index.ui5Framework.Openui5Resolver, "Module exported");
9+
t.truthy(index.ui5Framework.Sapui5Resolver, "Module exported");
10+
11+
t.truthy(index.validation.validator, "Module exported");
12+
t.truthy(index.validation.ValidationError, "Module exported");
13+
14+
t.truthy(index.translators.npm, "Module exported");
15+
t.truthy(index.translators.static, "Module exported");
16+
});

0 commit comments

Comments
 (0)