Add basic page tests

This commit is contained in:
Aaron O'Mullan
2014-03-30 22:30:30 -07:00
parent cfbdadd6e4
commit 9284eb4115
2 changed files with 45 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
# Python basics
Python is a nice language, you can add stuff. Bla bla bla.
Lets jump into an exercise :
---
It's dead simple, `c` must be the sum of `a` and `b`
```py
a = 1
b = 2
```
```py
a = 1
b = 2
c = a + b
```
```py
assert(c, 3)
```
---
Some more nice content ....
[Cool stuff](http://gitbook.io)
+15
View File
@@ -0,0 +1,15 @@
var fs = require('fs');
var path = require('path');
var assert = require('assert');
var page = require('../lib/page');
var CONTENT = fs.readFileSync(path.join(__dirname, './fixtures/PAGE.md'), 'utf8');
var LEXED = page(CONTENT);
describe('Page parsing', function() {
it('should detection sections', function() {
assert.equal(LEXED.length, 3);
});
});