18 lines
422 B
JavaScript
18 lines
422 B
JavaScript
|
import Asciidoctor from "@asciidoctor/core";
|
||
|
import StatSheetBlock from "./stat-sheet-block";
|
||
|
|
||
|
const asciidoctor = Asciidoctor();
|
||
|
const registry = asciidoctor.Extensions.create();
|
||
|
StatSheetBlock.register(registry);
|
||
|
|
||
|
const asciidoc = `
|
||
|
[stat-sheet]
|
||
|
bob marley
|
||
|
`;
|
||
|
|
||
|
test("it works", () => {
|
||
|
expect(
|
||
|
asciidoctor.convert(asciidoc, { extension_registry: registry })
|
||
|
).toEqual(expect.stringContaining("BOB MARLEY"));
|
||
|
});
|