summaryrefslogtreecommitdiffstats
path: root/test/codehighlighting.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-02-26 09:41:26 +0100
committerSamy Pessé <samypesse@gmail.com>2016-02-26 09:41:26 +0100
commitd3d64f636c859f7f01a64f7774cf70bd8ccdc562 (patch)
tree4f7731f37c3a793d187b0ab1cd77680e69534c6c /test/codehighlighting.js
parent4cb9cbb5ae3aa8f9211ffa3ac5e3d34232c0ca4f (diff)
parenteef072693b17526347c37b66078a5059c71caa31 (diff)
downloadgitbook-d3d64f636c859f7f01a64f7774cf70bd8ccdc562.zip
gitbook-d3d64f636c859f7f01a64f7774cf70bd8ccdc562.tar.gz
gitbook-d3d64f636c859f7f01a64f7774cf70bd8ccdc562.tar.bz2
Merge pull request #1109 from GitbookIO/3.0.0
Version 3.0.0
Diffstat (limited to 'test/codehighlighting.js')
-rw-r--r--test/codehighlighting.js65
1 files changed, 0 insertions, 65 deletions
diff --git a/test/codehighlighting.js b/test/codehighlighting.js
deleted file mode 100644
index f167980..0000000
--- a/test/codehighlighting.js
+++ /dev/null
@@ -1,65 +0,0 @@
-var path = require('path');
-var fs = require('fs');
-
-var Plugin = require('../lib/plugin');
-var PLUGINS_ROOT = path.resolve(__dirname, 'plugins');
-
-describe('Code Highlighting', function () {
- var book, PAGE;
-
- before(function() {
- return books.generate('highlight', 'website', {
- prepare: function(_book) {
- book = _book;
-
- var plugin = new Plugin(book, 'replace_highlight');
- plugin.load('./replace_highlight', PLUGINS_ROOT);
-
- book.plugins.load(plugin);
- }
- })
- .then(function() {
- PAGE = fs.readFileSync(
- path.join(book.options.output, 'index.html'),
- { encoding: 'utf-8' }
- );
- });
- });
-
- it('should correctly replace highlighting', function() {
- PAGE.should.be.html({
- 'code': {
- index: 0,
- text: 'code_test 1\n_code'
- }
- });
- });
-
- it('should correctly replace highlighting with language', function() {
- PAGE.should.be.html({
- 'code': {
- index: 1,
- text: 'lang_test 2\n_lang'
- }
- });
- });
-
- it('should correctly replace highlighting for inline code', function() {
- PAGE.should.be.html({
- 'code': {
- index: 2,
- text: 'code_test 3_code'
- }
- });
- });
-
- it('should correctly replace highlighting for inline code with html tags', function() {
- PAGE.should.be.html({
- 'code': {
- index: 3,
- text: 'code_<test>_code'
- }
- });
- });
-});
-