43 lines
1.1 KiB
JavaScript
43 lines
1.1 KiB
JavaScript
const test = require('node:test');
|
|
const assert = require('node:assert/strict');
|
|
|
|
const barrel = require('../index.js');
|
|
|
|
test('barrel exports expected public members', () => {
|
|
const expected = [
|
|
'predict',
|
|
'interpolation',
|
|
'configManager',
|
|
'assetApiConfig',
|
|
'outputUtils',
|
|
'configUtils',
|
|
'logger',
|
|
'validation',
|
|
'assertions',
|
|
'MeasurementContainer',
|
|
'nrmse',
|
|
'state',
|
|
'coolprop',
|
|
'convert',
|
|
'MenuManager',
|
|
'childRegistrationUtils',
|
|
'loadCurve',
|
|
'loadModel',
|
|
'gravity',
|
|
];
|
|
|
|
for (const key of expected) {
|
|
assert.ok(key in barrel, `missing export: ${key}`);
|
|
}
|
|
});
|
|
|
|
test('barrel types are callable where expected', () => {
|
|
assert.equal(typeof barrel.logger, 'function');
|
|
assert.equal(typeof barrel.validation, 'function');
|
|
assert.equal(typeof barrel.configUtils, 'function');
|
|
assert.equal(typeof barrel.outputUtils, 'function');
|
|
assert.equal(typeof barrel.MeasurementContainer, 'function');
|
|
assert.equal(typeof barrel.convert, 'function');
|
|
assert.equal(typeof barrel.gravity.getStandardGravity, 'function');
|
|
});
|