Skip to content

Commit

Permalink
Chore: Add test for code fences without blank lines
Browse files Browse the repository at this point in the history
Refs #69
  • Loading branch information
btmills committed May 13, 2017
1 parent 132ea5b commit 8cb8e00
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/lib/processor.js
Original file line number Diff line number Diff line change
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 8cb8e00

Please sign in to comment.