This commit is contained in:
Max 2021-12-06 17:04:12 -05:00
parent 4006d26c30
commit d6c7c38e85

View file

@ -5,16 +5,15 @@ import { getMountOptions } from "@/helpers/unit-test-helper";
describe("radioQuestion.vue", () => { describe("radioQuestion.vue", () => {
it("Should render the 'questionText' prop value as a span value for the radio question and the 'answer' values should render as text values for radio components.", async () => { it("Should render the 'questionText' prop value as a span value for the radio question and the 'answer' values should render as text values for radio components.", async () => {
// Arrange // Arrange
const chooseAnswer = jest.fn();
chooseAnswer.mockImplementation((answer) => {
mockData.data.answer = answer;
});
const mockData = { const mockData = {
chooseAnswer: chooseAnswer, chooseAnswer: jest.fn(),
data: { data: {
answer: null answer: null
} }
} }
mockData.chooseAnswer.mockImplementation((answer) => {
mockData.data.answer = answer;
});
const mountOptions = getMountOptions(mockData); const mountOptions = getMountOptions(mockData);