-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #237 from TobyAndToby/tb/move-test-config-files
Tb/move test config files
- Loading branch information
Showing
15 changed files
with
20 additions
and
46 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
9 changes: 4 additions & 5 deletions
9
e2e/config-file/test/cli/append.e2e.spec.ts → ...g-file/test/cli/append/append.e2e.spec.ts
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 |
---|---|---|
@@ -1,22 +1,21 @@ | ||
import { exec } from "child_process"; | ||
import fs from "fs/promises"; | ||
import { promisify } from "util"; | ||
import * as OutputFileNames from "../output-filenames.js"; | ||
import { output as outputFileName } from "./config.js"; | ||
|
||
const execAsync = promisify(exec); | ||
|
||
describe("cli", () => { | ||
beforeEach(async () => {}); | ||
|
||
it("should match snapshot when content is appended", async () => { | ||
const configPath = "./.config/append-config.js"; | ||
const outputPath = OutputFileNames.AppendConfig; | ||
const configPath = "./test/cli/append/config.js"; | ||
|
||
await execAsync(`npx generate-license-file -c ${configPath}`); | ||
|
||
const result = await fs.readFile(outputPath, "utf8"); | ||
const result = await fs.readFile(outputFileName, "utf8"); | ||
expect(result).toMatchSnapshot(); | ||
|
||
await fs.unlink(outputPath); | ||
await fs.unlink(outputFileName); | ||
}); | ||
}); |
4 changes: 1 addition & 3 deletions
4
e2e/config-file/.config/append-config.js → e2e/config-file/test/cli/append/config.js
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
File renamed without changes.
4 changes: 1 addition & 3 deletions
4
e2e/config-file/.config/exclude-config.js → e2e/config-file/test/cli/exclude/config.js
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
9 changes: 4 additions & 5 deletions
9
e2e/config-file/test/cli/exclude.e2e.spec.ts → ...file/test/cli/exclude/exclude.e2e.spec.ts
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 |
---|---|---|
@@ -1,22 +1,21 @@ | ||
import { exec } from "child_process"; | ||
import fs from "fs/promises"; | ||
import { promisify } from "util"; | ||
import * as OutputFileNames from "../output-filenames.js"; | ||
import { output as outputFileName } from "./config.js"; | ||
|
||
const execAsync = promisify(exec); | ||
|
||
describe("cli", () => { | ||
beforeEach(async () => {}); | ||
|
||
it("should match snapshot when content is excluded", async () => { | ||
const configPath = "./.config/exclude-config.js"; | ||
const outputPath = OutputFileNames.ExcludeConfig; | ||
const configPath = "./test/cli/exclude/config.js"; | ||
|
||
await execAsync(`npx generate-license-file -c ${configPath}`); | ||
|
||
const result = await fs.readFile(outputPath, "utf8"); | ||
const result = await fs.readFile(outputFileName, "utf8"); | ||
expect(result).toMatchSnapshot(); | ||
|
||
await fs.unlink(outputPath); | ||
await fs.unlink(outputFileName); | ||
}); | ||
}); |
File renamed without changes.
4 changes: 1 addition & 3 deletions
4
...nfig-file/.config/inputs-output-config.js → ...fig-file/test/cli/inputs-output/config.js
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 |
---|---|---|
@@ -1,7 +1,5 @@ | ||
const OutputFileNames = require("../test/output-filenames"); | ||
|
||
module.exports = { | ||
// Test that the input and output config is picked up from config correctly. | ||
inputs: ["./package.json"], | ||
output: OutputFileNames.InputsOutputConfig, | ||
output: "inputs-output-config-output.txt", | ||
}; |
9 changes: 4 additions & 5 deletions
9
...g-file/test/cli/inputs-output.e2e.spec.ts → ...i/inputs-output/inputs-output.e2e.spec.ts
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 |
---|---|---|
@@ -1,22 +1,21 @@ | ||
import { exec } from "child_process"; | ||
import fs from "fs/promises"; | ||
import { promisify } from "util"; | ||
import * as OutputFileNames from "../output-filenames.js"; | ||
import { output as outputFileName } from "./config.js"; | ||
|
||
const execAsync = promisify(exec); | ||
|
||
describe("cli", () => { | ||
beforeEach(async () => {}); | ||
|
||
it("should match snapshot when inputs and outputs are provided via config file", async () => { | ||
const configPath = "./.config/inputs-output-config.js"; | ||
const outputPath = OutputFileNames.InputsOutputConfig; | ||
const configPath = "./test/cli/inputs-output/config.js"; | ||
|
||
await execAsync(`npx generate-license-file -c ${configPath}`); | ||
|
||
const result = await fs.readFile(outputPath, "utf8"); | ||
const result = await fs.readFile(outputFileName, "utf8"); | ||
expect(result).toMatchSnapshot(); | ||
|
||
await fs.unlink(outputPath); | ||
await fs.unlink(outputFileName); | ||
}); | ||
}); |
File renamed without changes.
4 changes: 1 addition & 3 deletions
4
...config-file/.config/replacement-config.js → ...onfig-file/test/cli/replacement/config.js
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
File renamed without changes.
9 changes: 4 additions & 5 deletions
9
...fig-file/test/cli/replacement.e2e.spec.ts → ...t/cli/replacement/replacement.e2e.spec.ts
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 |
---|---|---|
@@ -1,22 +1,21 @@ | ||
import { exec } from "child_process"; | ||
import fs from "fs/promises"; | ||
import { promisify } from "util"; | ||
import * as OutputFileNames from "../output-filenames.js"; | ||
import { output as outputFileName } from "./config.js"; | ||
|
||
const execAsync = promisify(exec); | ||
|
||
describe("cli", () => { | ||
beforeEach(async () => {}); | ||
|
||
it("should match snapshot when a package is replaced", async () => { | ||
const configPath = "./.config/replacement-config.js"; | ||
const outputPath = OutputFileNames.ReplacementConfig; | ||
const configPath = "./test/cli/replacement/config.js"; | ||
|
||
await execAsync(`npx generate-license-file -c ${configPath}`); | ||
|
||
const result = await fs.readFile(outputPath, "utf8"); | ||
const result = await fs.readFile(outputFileName, "utf8"); | ||
expect(result).toMatchSnapshot(); | ||
|
||
await fs.unlink(outputPath); | ||
await fs.unlink(outputFileName); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.