agent updates
This commit is contained in:
42
test/00-barrel-contract.test.js
Normal file
42
test/00-barrel-contract.test.js
Normal file
@@ -0,0 +1,42 @@
|
||||
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');
|
||||
});
|
||||
Reference in New Issue
Block a user