before functional changes by codex

This commit is contained in:
znetsixe
2026-02-19 17:37:09 +01:00
parent 6b58dd4bd5
commit 00858eb853
20 changed files with 1982 additions and 3 deletions

0
test/basic/.gitkeep Normal file
View File

View 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'));
});

View 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');
});
});