21 lines
597 B
TypeScript
21 lines
597 B
TypeScript
|
import { transform } from "../../../../src/utils/translators/ldb/staffStation";
|
||
|
|
||
|
import { inputs } from "./stationInputs.test.data";
|
||
|
import { outputs } from "./stationOutputs.test.data";
|
||
|
|
||
|
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);
|
||
|
|
||
|
});
|
||
|
}
|
||
|
});
|