mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-24 11:26:31 +00:00
Add basic page tests
This commit is contained in:
Vendored
+30
@@ -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)
|
||||
@@ -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);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user