-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved old tests out of place for new improved test cases which moves …
…all scenarios into separate folders.
- Loading branch information
Showing
18 changed files
with
36 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { bundle, clean } from "../util" | ||
|
||
test("Flat", async () => { | ||
const outputFile = `./output/index.js` | ||
|
||
await bundle("flat.js", outputFile) | ||
|
||
// await Promise.all([ | ||
// expect(fs.pathExists(outputFile)).resolves.toBeTruthy() | ||
// ]) | ||
|
||
// await clean(outputFile) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import fs from "fs-extra" | ||
import { rollup } from "rollup" | ||
|
||
import rebasePlugin from "../src" | ||
|
||
export async function bundle(input, outputFile, pluginOptions = {}) { | ||
const plugin = rebasePlugin(pluginOptions) | ||
|
||
const result = await rollup({ | ||
input, | ||
plugins: [ plugin ] | ||
}) | ||
|
||
await result.write({ | ||
format: "es", | ||
file: outputFile | ||
}) | ||
} | ||
|
||
export async function clean(files) { | ||
const tasks = files.map((file) => fs.remove(file)) | ||
return Promise.all(tasks) | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters