Skip to content

Commit

Permalink
Add test to demonstrate img array bug
Browse files Browse the repository at this point in the history
See: #97
  • Loading branch information
johnbeech authored Feb 14, 2023
1 parent 028ef4a commit d613e1c
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,27 @@ tester.describe("json2md", test => {
cb();
});

// Image array
test.it("should support an array of images", function(cb) {
test.expect(json2md({
img:[{
source: "source",
title: "title",
alt: 'alt',
}, {
source: "sauce",
title: "heading",
alt: 'salt',
}]
})).toBe([
'![alt](source "title")',
'',
'![salt](sauce "heading")',
'',
].join('\n'));
cb();
});

// Links
test.it("should support links", function(cb) {
test.expect(json2md({
Expand Down

0 comments on commit d613e1c

Please sign in to comment.