Skip to content

Commit

Permalink
chore: test garden scan for each example project
Browse files Browse the repository at this point in the history
  • Loading branch information
edvald authored and eysi09 committed Sep 6, 2018
1 parent d1ba425 commit 6a153b8
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions garden-cli/test/src/commands/scan.ts
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: {} })
})
}
})

0 comments on commit 6a153b8

Please sign in to comment.