Skip to content

Commit

Permalink
chore(test): fix flaky watcher test
Browse files Browse the repository at this point in the history
The module names in the event payload here sometimes came out in a
different order in CI. Sorting the array should resolve this.
  • Loading branch information
thsig authored and edvald committed Feb 24, 2021
1 parent 725f8a5 commit 0049530
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions core/test/unit/src/watch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,12 @@ describe("Watcher", () => {
it("containing both modules' names when a source file is changed for two co-located modules", async () => {
const pathsChanged = [resolve(doubleModulePath, "foo.txt")]
emitEvent(garden, "change", pathsChanged[0])
expect(getEventLog()).to.eql([
{
name: "moduleSourcesChanged",
payload: { names: ["module-b", "module-c"], pathsChanged },
},
])
const event = getEventLog()[0]
event.payload.names = event.payload.names.sort()
expect(event).to.eql({
name: "moduleSourcesChanged",
payload: { names: ["module-b", "module-c"], pathsChanged },
})
})
})

Expand Down

0 comments on commit 0049530

Please sign in to comment.