var tester = require('gitbook-tester'); var test = require('tape'); var pkg = require('./package.json'); test('should highlight javascript code block', function (t) { t.plan(1); tester.builder() .withContent('```js\nfunction() { return true };\n```') .withLocalPlugin(__dirname) .withBookJson({ gitbook: pkg.engines.gitbook, plugins: ['prism', '-highlight'] }) .create() .then(function(result) { var expected = '
function() { return true };
'; t.equal(result[0].content, expected); }) .done(); });