summaryrefslogtreecommitdiffstats
path: root/packages/gitbook-html/test/readme.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-12-22 13:12:16 +0100
committerSamy Pessé <samypesse@gmail.com>2016-12-22 13:12:16 +0100
commit97f2c333a87b9d939b5a7dc2884590c971b53291 (patch)
treea22824b02d84a89e59c458c8af7d3494561d43f6 /packages/gitbook-html/test/readme.js
parent627e6dd866f77ff497a21f0b706490b82e40ea0e (diff)
downloadgitbook-97f2c333a87b9d939b5a7dc2884590c971b53291.zip
gitbook-97f2c333a87b9d939b5a7dc2884590c971b53291.tar.gz
gitbook-97f2c333a87b9d939b5a7dc2884590c971b53291.tar.bz2
Import and adapt gitbook-html
Refactor to remove lodash and q as dependencies
Diffstat (limited to 'packages/gitbook-html/test/readme.js')
-rwxr-xr-xpackages/gitbook-html/test/readme.js32
1 files changed, 16 insertions, 16 deletions
diff --git a/packages/gitbook-html/test/readme.js b/packages/gitbook-html/test/readme.js
index f38f40b..929ba10 100755
--- a/packages/gitbook-html/test/readme.js
+++ b/packages/gitbook-html/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.html'), 'utf8');
+ before(() => {
+ const CONTENT = fs.readFileSync(path.join(__dirname, './fixtures/README.html'), '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.');
});
});