ut
This commit is contained in:
parent
4006d26c30
commit
d6c7c38e85
1 changed files with 4 additions and 5 deletions
|
|
@ -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);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue