mirror of
https://github.com/atom/atom.git
synced 2026-01-21 04:48:12 -05:00
Fix test initialization
If multiple specs were to populate the events var, one spec would pollute the others. So, let's reset the events var at the beginning of each spec. Co-Authored-By: Antonio Scandurra <as-cii@github.com>
This commit is contained in:
@@ -1042,11 +1042,12 @@ describe('Project', () => {
|
||||
});
|
||||
|
||||
describe('.onDidChangeFiles()', () => {
|
||||
let sub = [];
|
||||
const events = [];
|
||||
let sub;
|
||||
let events;
|
||||
let checkCallback = () => {};
|
||||
|
||||
beforeEach(() => {
|
||||
events = []
|
||||
sub = atom.project.onDidChangeFiles(incoming => {
|
||||
events.push(...incoming);
|
||||
checkCallback();
|
||||
|
||||
Reference in New Issue
Block a user