Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S committed Mar 21, 2024
1 parent 53824a1 commit a3883c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 3 additions & 5 deletions src/vscode/EventEmitter.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { describe, expect, jest, test } from '@jest/globals';
// eslint-disable-next-line node/no-missing-import
import type * as vscode from 'vscode';

import { EventEmitter } from './EventEmitter';

Expand All @@ -12,8 +10,8 @@ describe('EventEmitter', () => {
emitter.event(listener);
emitter.event(listener2);
emitter.fire('foo');
expect(listener).toBeCalledWith('foo');
expect(listener2).toBeCalledWith('foo');
expect(listener).toHaveBeenCalledWith('foo');
expect(listener2).toHaveBeenCalledWith('foo');
});

test('dispose', () => {
Expand All @@ -23,6 +21,6 @@ describe('EventEmitter', () => {
emitter.fire('foo');
disposable.dispose();
emitter.fire('bar');
expect(listener).toBeCalledWith('foo');
expect(listener).toHaveBeenCalledWith('foo');
});
});
4 changes: 3 additions & 1 deletion src/vscode/EventEmitter.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
// eslint-disable-next-line node/no-missing-import
import type * as vscode from 'vscode';
import type { Disposable } from 'vscode';

type Disposable = vscode.Disposable;

type Listener<T> = (e: T) => any;

Expand Down

0 comments on commit a3883c3

Please sign in to comment.