diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/fixtures/QUIZ_PAGE.md | 16 | ||||
-rw-r--r-- | test/page.js | 9 |
2 files changed, 18 insertions, 7 deletions
diff --git a/test/fixtures/QUIZ_PAGE.md b/test/fixtures/QUIZ_PAGE.md index f494592..545d083 100644 --- a/test/fixtures/QUIZ_PAGE.md +++ b/test/fixtures/QUIZ_PAGE.md @@ -8,14 +8,22 @@ Here's a quiz about Gitbook | | Good | Bad | | ---------------- | ---- | --- | -| What is Gitbook? | ( ) | ( ) | - -| | Good | Bad | -| ---------------- | ---- | --- | | What is Gitbook? | (x) | ( ) | > Gitbook is good +What does Gitbook support? +- [x] Table-based questions with radio buttons +- [x] Table-based questions with checkboxes +- [ ] Telepathy +- [x] List-based questions with checkboxes +- [x] List-based questions with radio buttons +- [ ] Moon-on-a-stick + +> Gitbook supports table and list based quiz questions using either radio buttons or checkboxes. +> +> Gitbook is not telepathic and does not give you the moon on a stick. + --- Some more nice content .... diff --git a/test/page.js b/test/page.js index 2954155..7abe0af 100644 --- a/test/page.js +++ b/test/page.js @@ -67,9 +67,12 @@ describe('Page parsing', function() { it('should render a quiz', function() { assert(QUIZ_LEXED[1].content); assert(QUIZ_LEXED[1].quiz); - assert(QUIZ_LEXED[1].quiz.base); - assert(QUIZ_LEXED[1].quiz.solution); - assert(QUIZ_LEXED[1].quiz.feedback); + assert(QUIZ_LEXED[1].quiz[0].base); + assert(QUIZ_LEXED[1].quiz[0].solution); + assert(QUIZ_LEXED[1].quiz[0].feedback); + assert(QUIZ_LEXED[1].quiz[1].base); + assert(QUIZ_LEXED[1].quiz[1].solution); + assert(QUIZ_LEXED[1].quiz[1].feedback); }); }); |