Skip to content

Commit

Permalink
fix: review update (TBS)
Browse files Browse the repository at this point in the history
  • Loading branch information
edvald committed Jul 24, 2019
1 parent 92210c5 commit df60824
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/using-garden/configuration-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ belong to which module. See the next section for details.

### Including/excluding files

By default, all files in the same directory as a module configuration files are included as source files for that module. Sometimes you need more granular control over the context, not least if you have multiple modules in the same directory.
By default, all files in the same directory as a module configuration file are included as source files for that module. Sometimes you need more granular control over the context, not least if you have multiple modules in the same directory.

Garden provides two different ways to achieve this:

Expand Down
8 changes: 5 additions & 3 deletions garden-service/test/unit/src/vcs/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,16 @@ describe("GitHandler", () => {
})

it("should respect include and exclude patterns, if both are specified", async () => {
const pathA = resolve(tmpPath, "yes.txt")
const dir = resolve(tmpPath, "module-a")
const pathA = resolve(dir, "yes.txt")
const pathB = resolve(tmpPath, "no.txt")
const pathC = resolve(tmpPath, "yes.pass")
const pathC = resolve(dir, "yes.pass")
await mkdir(dir)
await createFile(pathA)
await createFile(pathB)
await createFile(pathC)

const files = (await handler.getFiles(tmpPath, ["yes.*"], ["*.txt"]))
const files = (await handler.getFiles(tmpPath, ["module-a/**/*"], ["**/*.txt"]))
.map(f => f.path)

expect(files).to.eql([pathC])
Expand Down

0 comments on commit df60824

Please sign in to comment.