From 2d314051fac8aa69619dd40c3ee63abf66e400f9 Mon Sep 17 00:00:00 2001 From: Sebastian Werner Date: Mon, 17 Dec 2018 12:58:50 +0100 Subject: [PATCH] New test + renamed files --- test/flat/{flat.js => index.js} | 0 test/flat/{flat.test.js => index.test.js} | 2 +- test/one-level/assets/content.md | 1 + test/one-level/index.js | 5 +++++ test/one-level/index.test.js | 16 ++++++++++++++++ 5 files changed, 23 insertions(+), 1 deletion(-) rename test/flat/{flat.js => index.js} (100%) rename test/flat/{flat.test.js => index.test.js} (83%) create mode 100644 test/one-level/assets/content.md create mode 100644 test/one-level/index.js create mode 100644 test/one-level/index.test.js 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") +})