summaryrefslogtreecommitdiffstats
path: root/test/page.js
diff options
context:
space:
mode:
authorAaron O'Mullan <aaron.omullan@friendco.de>2014-04-08 15:01:12 -0700
committerAaron O'Mullan <aaron.omullan@friendco.de>2014-04-08 15:01:12 -0700
commit392573a9905a36d4a6c3cc1947c533f742b653a2 (patch)
treedd47c5039cdf2b24e8b54c141d2d5f161d116f4b /test/page.js
parent554d6a6170d448d3c4cd635528d4f94e928472f2 (diff)
downloadgitbook-392573a9905a36d4a6c3cc1947c533f742b653a2.zip
gitbook-392573a9905a36d4a6c3cc1947c533f742b653a2.tar.gz
gitbook-392573a9905a36d4a6c3cc1947c533f742b653a2.tar.bz2
Add lexing support for content code in exercises
#52, #49, #46
Diffstat (limited to 'test/page.js')
-rw-r--r--test/page.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/page.js b/test/page.js
index 0f54809..658559e 100644
--- a/test/page.js
+++ b/test/page.js
@@ -16,7 +16,7 @@ var LINKS_CONTENT = fs.readFileSync(path.join(__dirname, './fixtures/GITHUB_LINK
describe('Page parsing', function() {
it('should detection sections', function() {
- assert.equal(LEXED.length, 3);
+ assert.equal(LEXED.length, 4);
});
it('should detection section types', function() {
@@ -36,6 +36,14 @@ describe('Page parsing', function() {
assert(LEXED[1].code.base);
assert(LEXED[1].code.solution);
assert(LEXED[1].code.validation);
+ assert(LEXED[1].code.context === null);
+
+ assert(LEXED[3].content);
+ assert(LEXED[3].code);
+ assert(LEXED[3].code.base);
+ assert(LEXED[3].code.solution);
+ assert(LEXED[3].code.validation);
+ assert(LEXED[3].code.context);
});
it('should merge sections correctly', function() {