diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-12-22 15:51:59 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-12-22 15:51:59 +0100 |
commit | c4e512477e3cbe1344caaa2f1cc56e4bb402ad79 (patch) | |
tree | ca43a054bf84a49b48c942b754153b5459eed3ee /packages/gitbook-markdown/test/readme.js | |
parent | 6e0fd5d5d44fc2c97e075c4bbff188a0a7e797c1 (diff) | |
download | gitbook-c4e512477e3cbe1344caaa2f1cc56e4bb402ad79.zip gitbook-c4e512477e3cbe1344caaa2f1cc56e4bb402ad79.tar.gz gitbook-c4e512477e3cbe1344caaa2f1cc56e4bb402ad79.tar.bz2 |
Import gitbook-markdown
Diffstat (limited to 'packages/gitbook-markdown/test/readme.js')
-rw-r--r-- | packages/gitbook-markdown/test/readme.js | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/packages/gitbook-markdown/test/readme.js b/packages/gitbook-markdown/test/readme.js index dd059fb..fad9c53 100644 --- a/packages/gitbook-markdown/test/readme.js +++ b/packages/gitbook-markdown/test/readme.js @@ -1,30 +1,30 @@ -var fs = require('fs'); -var path = require('path'); -var assert = require('assert'); +const fs = require('fs'); +const path = require('path'); +const expect = require('expect'); -var readme = require('../').readme; +const readme = require('../src').readme; -describe('Readme parsing', function () { - var LEXED; +describe('Readme', () => { + let LEXED; - before(function() { - var CONTENT = fs.readFileSync(path.join(__dirname, './fixtures/README.md'), 'utf8'); + before(() => { + const CONTENT = fs.readFileSync(path.join(__dirname, './fixtures/README.md'), 'utf8'); LEXED = readme(CONTENT); }); - it('should contain a title', function() { - assert(LEXED.title); + it('should contain a title', () => { + expect(LEXED.title).toExist(); }); - it('should contain a description', function() { - assert(LEXED.description); + it('should contain a description', () => { + expect(LEXED.description).toExist(); }); - it('should extract the right title', function() { - assert.equal(LEXED.title, "This is the title"); + it('should extract the right title', () => { + expect(LEXED.title).toBe('This is the title'); }); - it('should extract the right description', function() { - assert.equal(LEXED.description, "This is the book description."); + it('should extract the right description', () => { + expect(LEXED.description).toBe('This is the book description.'); }); }); |