| 19 | const DOWN = "\u001B\u005B\u0042"; |
| 20 | |
| 21 | const dataForTests = (rootAssetsPath) => ({ |
| 22 | loaderName: "test-loader", |
| 23 | loaderPath: join(rootAssetsPath, "test-loader"), |
| 24 | defaultLoaderPath: join(rootAssetsPath, "my-loader"), |
| 25 | genPath: join(rootAssetsPath, "test-assets"), |
| 26 | customLoaderPath: join(rootAssetsPath, "test-assets", "loaderName"), |
| 27 | defaultTemplateFiles: [ |
| 28 | "package.json", |
| 29 | "package-lock.json", |
| 30 | "examples", |
| 31 | "src", |
| 32 | "test", |
| 33 | "src/index.js", |
| 34 | "examples/simple/webpack.config.js", |
| 35 | ], |
| 36 | }); |
| 37 | |
| 38 | describe("loader command", () => { |
| 39 | it("should scaffold loader with default name if no loader name provided", async () => { |