Use a queue to prevent concurrent async writeFile calls

This commit is contained in:
Max Brunsfeld
2018-01-26 11:15:35 -08:00
parent 1d20b8ee1d
commit 8f5cecbacd
4 changed files with 42 additions and 18 deletions

View File

@@ -177,13 +177,11 @@ describe('Config', () => {
it("saves the user's config to disk after it stops changing", () => {
atom.config.set('foo.bar.baz', 42)
advanceClock(50)
expect(savedSettings.length).toBe(0)
atom.config.set('foo.bar.baz', 43)
advanceClock(50)
expect(savedSettings.length).toBe(0)
atom.config.set('foo.bar.baz', 44)
advanceClock(150)
advanceClock(10)
expect(savedSettings.length).toBe(1)
})