Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions spec/src/modules/quizzes.js
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,7 @@ describe(`ConstructorIO - Quizzes${bundledDescriptionSuffix}`, () => {
expect(res).to.have.property('quiz_version_id').to.be.an('string');
expect(res).to.have.property('quiz_id').to.be.an('string');
expect(res).to.have.property('results_config').to.be.an('object');
expect(res).to.have.property('metadata').to.be.an('object');
});
});

Expand All @@ -564,6 +565,7 @@ describe(`ConstructorIO - Quizzes${bundledDescriptionSuffix}`, () => {
const requestedUrlParams = helpers.extractUrlParamsFromFetch(fetchSpy);

expect(res).to.have.property('results_config').to.be.an('object');
expect(res).to.have.property('metadata').to.be.an('object');
expect(res).to.have.property('quiz_version_id').to.be.an('string').to.equal(quizVersionId);
expect(res).to.have.property('quiz_id').to.be.an('string');
expect(fetchSpy).to.have.been.called;
Expand Down
2 changes: 2 additions & 0 deletions src/types/quizzes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ export interface BaseQuestion extends Record<string, any> {
description: string;
cta_text: Nullable<string>;
images?: Nullable<QuestionImages>;
is_skippable: Boolean;
}

export interface FilterValueQuestion extends BaseQuestion {
Expand Down Expand Up @@ -188,6 +189,7 @@ export interface QuizResultsConfig extends Record<string, any> {
}

export interface QuizResultsConfigResponse extends Record<string, any> {
metadata: Nullable<object>,
results_config: QuizResultsConfig,
quiz_version_id: string;
quiz_id: string;
Expand Down
Loading