Skip to content
This repository was archived by the owner on Mar 30, 2021. It is now read-only.

Commit 0a0aa23

Browse files
committed
Added tests for new prompts
1 parent 2b9b383 commit 0a0aa23

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

__tests__/app.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,25 @@ describe("generator-biojs-webcomponents:app - Upgrade an existing component by i
9191
it("skips the current question if user enters skip", async () => {
9292
assert.equal(await validators.importBuildFileLocally("skip"), true);
9393
});
94+
it("renames the directory in which build file will be imported", async () => {
95+
await validators
96+
.renameDirectory("test-directory")
97+
.then(() => assert.file(["test-directory", "component-dist"]));
98+
});
99+
it("pastes the build file in renamed directory", async () => {
100+
await validators
101+
.importBuildFileInRenamedDirectory(path.join(__dirname, "../LICENSE"), {
102+
renameDirectory: "test-directory"
103+
})
104+
.then(() => assert.file(["test-directory/LICENSE"]));
105+
});
106+
it("overwrites the directory content", async () => {
107+
await validators
108+
.overwriteDirectoryContent(path.join(__dirname, "../README.md"))
109+
.then(() => {
110+
assert.file(["component-dist/README.md"]);
111+
});
112+
});
94113
it("throws an error if user enters an empty string as path of build file", async () => {
95114
assert.equal(
96115
await validators.importBuildFileFromNPM(""),

0 commit comments

Comments
 (0)