Skip to content

Commit 5d0f73b

Browse files
committed
Fix linting and tests
1 parent 258c0b4 commit 5d0f73b

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

src/components/SinglePastCommitInfo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { CommandRegistry } from '@lumino/commands';
33
import * as React from 'react';
44
import { FixedSizeList, ListChildComponentProps } from 'react-window';
55
import { classes } from 'typestyle';
6-
import { CommandArguments} from '../commandsAndMenu';
6+
import { CommandArguments } from '../commandsAndMenu';
77
import { LoggerContext } from '../logger';
88
import { GitExtension } from '../model';
99
import {

src/index.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ import { IMainMenu } from '@jupyterlab/mainmenu';
1111
import { IRenderMimeRegistry } from '@jupyterlab/rendermime';
1212
import { ISettingRegistry } from '@jupyterlab/settingregistry';
1313
import { IStatusBar } from '@jupyterlab/statusbar';
14-
import { addCommands, addFileBrowserContextMenu, createGitMenu } from './commandsAndMenu';
14+
import {
15+
addCommands,
16+
addFileBrowserContextMenu,
17+
createGitMenu
18+
} from './commandsAndMenu';
1519
import { GitExtension } from './model';
1620
import { getServerSettings } from './server';
1721
import { gitIcon } from './style/icons';
@@ -171,7 +175,12 @@ async function activate(
171175
addStatusBarWidget(statusBar, gitExtension, settings);
172176

173177
// Add the context menu items for the default file browser
174-
addFileBrowserContextMenu(gitExtension, factory.tracker, app.commands, app.contextMenu);
178+
addFileBrowserContextMenu(
179+
gitExtension,
180+
factory.tracker,
181+
app.commands,
182+
app.contextMenu
183+
);
175184
}
176185

177186
return gitExtension;

tests/commands.spec.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import { JupyterFrontEnd } from '@jupyterlab/application';
22
import { showDialog } from '@jupyterlab/apputils';
33
import { CommandRegistry } from '@lumino/commands';
44
import 'jest';
5-
import { addCommands} from '../src/commandsAndMenu';
5+
import { CommandArguments, addCommands} from '../src/commandsAndMenu';
66
import * as git from '../src/git';
77
import { GitExtension } from '../src/model';
8-
import { CommandIDs, Git } from '../src/tokens';
8+
import { ContextCommandIDs, CommandIDs, Git } from '../src/tokens';
99
import {
1010
defaultMockedResponses,
1111
IMockedResponses,
@@ -125,14 +125,14 @@ describe('git-commands', () => {
125125
model.pathRepository = '/path/to/repo';
126126
await model.ready;
127127

128-
await commands.execute(CommandIDs.gitFileDiscard, {
128+
await commands.execute(ContextCommandIDs.gitFileDiscard, ({files: [{
129129
x,
130130
y: ' ',
131131
from: 'from',
132132
to: path,
133133
status: status as Git.Status,
134134
is_binary: false
135-
});
135+
}]} as CommandArguments.IGitContextAction) as any);
136136

137137
if (status === 'staged' || status === 'partially-staged') {
138138
expect(spyReset).toHaveBeenCalledWith(path);

0 commit comments

Comments
 (0)