22 lines
657 B
JavaScript
22 lines
657 B
JavaScript
import assert from "node:assert/strict";
|
|
import test from "node:test";
|
|
|
|
import {CONVERTIBLE_MODEL_FORMATS, conversionQueuedMessage} from "./cad-formats.js";
|
|
|
|
test("routes STEP and IGES filename variants to canonical converter formats", () => {
|
|
assert.deepEqual(
|
|
Object.fromEntries(CONVERTIBLE_MODEL_FORMATS),
|
|
{
|
|
".step": "step",
|
|
".stp": "step",
|
|
".iges": "iges",
|
|
".igs": "iges"
|
|
}
|
|
);
|
|
});
|
|
|
|
test("conversion message names the canonical source format", () => {
|
|
assert.match(conversionQueuedMessage("iges"), /IGES/);
|
|
assert.match(conversionQueuedMessage("step"), /STEP/);
|
|
});
|