Unit Testing: Body Part Selection V2 - CBTYoung/Documentation GitHub Wiki
import { bodyParts, BodyPartSelection } from "../../../../src/architecture/business_layer/modules/ReportStrategies/BodyPartSelection";
describe("Body Part selection tests", () => {
test('isStringBodyPart correct input', () => {
const part: string = bodyParts.hand;
const result = BodyPartSelection.isStringBodyPart(part);
expect(result).toBeInstanceOf(BodyPartSelection);
})
test('adding empty event with all other variables filled', () => {
const part: string = "poop";
const result = BodyPartSelection.isStringBodyPart(part);
expect(result).not.toBeInstanceOf(BodyPartSelection);
})
});