Skip to content

Commit

Permalink
Chore: Add test for code fences without blank lines (#72)
Browse files Browse the repository at this point in the history
Refs #69
  • Loading branch information
btmills committed May 13, 2017
1 parent 3abc569 commit 249904f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/lib/processor.js
Expand Up @@ -257,6 +257,22 @@ describe("processor", function() {
assert.equal(blocks.length, 1);
});

it("should find code fences not surrounded by blank lines", function() {
var code = [
"<!-- eslint-disable -->",
"```js",
"var answer = 6 * 7;",
"```",
"Paragraph text",
"```js",
"var answer = 6 * 7;",
"```"
].join("\n");
var blocks = processor.preprocess(code);

assert.equal(blocks.length, 2);
});

it("should return the source code in the block", function() {
var code = [
"```js",
Expand Down

0 comments on commit 249904f

Please sign in to comment.