before functional changes by codex
This commit is contained in:
0
test/basic/.gitkeep
Normal file
0
test/basic/.gitkeep
Normal file
27
test/basic/constructor.basic.test.js
Normal file
27
test/basic/constructor.basic.test.js
Normal file
@@ -0,0 +1,27 @@
|
||||
const test = require('node:test');
|
||||
const assert = require('node:assert/strict');
|
||||
|
||||
const Monster = require('../../src/specificClass');
|
||||
const { makeMonsterConfig } = require('../helpers/factories');
|
||||
|
||||
test('constructor initializes sampling boundaries and target values', () => {
|
||||
const monster = new Monster(makeMonsterConfig());
|
||||
|
||||
assert.equal(monster.maxVolume, 20);
|
||||
assert.equal(monster.minPuls, Math.round(monster.minVolume / monster.volume_pulse));
|
||||
assert.equal(monster.absMaxPuls, Math.round(monster.cap_volume / monster.volume_pulse));
|
||||
assert.ok(monster.targetPuls > 0);
|
||||
});
|
||||
|
||||
test('output contract contains report tooling fields', () => {
|
||||
const monster = new Monster(makeMonsterConfig());
|
||||
const output = monster.getOutput();
|
||||
|
||||
assert.ok(Object.prototype.hasOwnProperty.call(output, 'm3PerPuls'));
|
||||
assert.ok(Object.prototype.hasOwnProperty.call(output, 'm3PerPulse'));
|
||||
assert.ok(Object.prototype.hasOwnProperty.call(output, 'm3Total'));
|
||||
assert.ok(Object.prototype.hasOwnProperty.call(output, 'pulse'));
|
||||
assert.ok(Object.prototype.hasOwnProperty.call(output, 'pulsesRemaining'));
|
||||
assert.ok(Object.prototype.hasOwnProperty.call(output, 'targetDeltaM3'));
|
||||
assert.ok(Object.prototype.hasOwnProperty.call(output, 'predictedRateM3h'));
|
||||
});
|
||||
8
test/basic/structure-module-load.basic.test.js
Normal file
8
test/basic/structure-module-load.basic.test.js
Normal file
@@ -0,0 +1,8 @@
|
||||
const test = require('node:test');
|
||||
const assert = require('node:assert/strict');
|
||||
|
||||
test('monster module load smoke', () => {
|
||||
assert.doesNotThrow(() => {
|
||||
require('../../monster.js');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user