2023-08-01 21:34:30 +01:00
|
|
|
import { transform } from "../../../../src/utils/translators/ldb/staffStation";
|
|
|
|
|
2023-08-01 21:49:00 +01:00
|
|
|
import { inputs } from "./stationInputs";
|
|
|
|
import { outputs } from "./stationOutputs";
|
2023-08-01 21:34:30 +01:00
|
|
|
|
|
|
|
describe('transform', () => {
|
|
|
|
test('Should return null for empty input', () => {
|
|
|
|
const input = {};
|
|
|
|
expect(transform(input)).toBeNull();
|
|
|
|
});
|
|
|
|
|
|
|
|
for (const testNo in inputs) {
|
|
|
|
test(`Should correctly transform data ${testNo + 1}`, () => {
|
|
|
|
const input = inputs[testNo]
|
|
|
|
const expectedOutput = outputs[testNo]
|
|
|
|
|
|
|
|
expect(transform(input)).toEqual(expectedOutput);
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|