diff --git a/test/flat/flat.js b/test/flat/index.js similarity index 100% rename from test/flat/flat.js rename to test/flat/index.js diff --git a/test/flat/flat.test.js b/test/flat/index.test.js similarity index 83% rename from test/flat/flat.test.js rename to test/flat/index.test.js index 5aa3462..545b9fe 100644 --- a/test/flat/flat.test.js +++ b/test/flat/index.test.js @@ -4,7 +4,7 @@ import { bundle, clean, exists } from "../util" const root = __dirname test("Flat", async () => { - await bundle(root, "flat.js", "output/index.js") + await bundle(root, "index.js", "output/index.js") expect(exists(root, [ diff --git a/test/one-level/assets/content.md b/test/one-level/assets/content.md new file mode 100644 index 0000000..fec5601 --- /dev/null +++ b/test/one-level/assets/content.md @@ -0,0 +1 @@ +# Hello diff --git a/test/one-level/index.js b/test/one-level/index.js new file mode 100644 index 0000000..3b8a2a3 --- /dev/null +++ b/test/one-level/index.js @@ -0,0 +1,5 @@ +import content from "./assets/content.md" + +export default function() { + return content +} diff --git a/test/one-level/index.test.js b/test/one-level/index.test.js new file mode 100644 index 0000000..3accc00 --- /dev/null +++ b/test/one-level/index.test.js @@ -0,0 +1,16 @@ +/* global __dirname */ +import { bundle, clean, exists } from "../util" + +const root = __dirname + +test("One Level", async () => { + await bundle(root, "index.js", "output/index.js") + + expect(exists(root, + [ + "output/index.js", + "output/bsdudxaF.md" + ])).resolves.toBeTruthy() + + await clean(root, "output") +})