-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: test
garden scan
for each example project
- Loading branch information
Showing
1 changed file
with
9 additions
and
8 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 |
---|---|---|
@@ -1,14 +1,15 @@ | ||
import { join } from "path" | ||
import { Garden } from "../../../src/garden" | ||
import { ScanCommand } from "../../../src/commands/scan" | ||
import { getExampleProjects } from "../../helpers" | ||
|
||
describe("ScanCommand", () => { | ||
it("should successfully scan the hello-world project", async () => { | ||
const root = join(__dirname, "..", "..", "..", "..", "examples", "hello-world") | ||
const garden = await Garden.factory(root) | ||
const ctx = garden.getPluginContext() | ||
const command = new ScanCommand() | ||
for (const [name, path] of Object.entries(getExampleProjects())) { | ||
it(`should successfully scan the ${name} project`, async () => { | ||
const garden = await Garden.factory(path) | ||
const ctx = garden.getPluginContext() | ||
const command = new ScanCommand() | ||
|
||
await command.action({ garden, ctx, args: {}, opts: {} }) | ||
}) | ||
await command.action({ garden, ctx, args: {}, opts: {} }) | ||
}) | ||
} | ||
}) |