forked from jasonwilliams/anki
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vscode.ts
86 lines (75 loc) · 1.77 KB
/
vscode.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
const languages = {
createDiagnosticCollection: jest.fn(),
registerCodeLensProvider: jest.fn(),
};
const StatusBarAlignment = { Left: 1, Right: 2 };
const window = {
createStatusBarItem: jest.fn(() => ({
show: jest.fn(),
tooltip: jest.fn(),
})),
showErrorMessage: jest.fn(),
showWarningMessage: jest.fn(),
createTextEditorDecorationType: jest.fn(),
createOutputChannel: jest.fn(),
showWorkspaceFolderPick: jest.fn(),
onDidChangeActiveTextEditor: jest.fn(),
showInformationMessage: jest.fn(),
};
const workspace = {
getConfiguration: jest.fn(() => ({
get: jest.fn((val: string) => {
switch (val) {
case "card.frontBackSeparator":
return "%";
case "card.separator":
return "(?=^##\\s)";
case "card.tagPattern":
return "^\\[#(.*)\\]";
case "card.createTagForTitle":
return true;
default:
break;
}
}),
})),
workspaceFolders: [],
getWorkspaceFolder: jest.fn(),
onDidChangeConfiguration: jest.fn(),
onDidChangeTextDocument: jest.fn(),
onDidChangeWorkspaceFolders: jest.fn(),
};
const OverviewRulerLane = {
Left: null,
};
const Uri = {
file: (f: any) => f,
parse: jest.fn(),
};
const Range = jest.fn();
const Diagnostic = jest.fn();
const DiagnosticSeverity = { Error: 0, Warning: 1, Information: 2, Hint: 3 };
const debug = {
onDidTerminateDebugSession: jest.fn(),
startDebugging: jest.fn(),
registerDebugConfigurationProvider: jest.fn(),
};
const commands = {
executeCommand: jest.fn(),
registerCommand: jest.fn(),
};
const CodeLens = function CodeLens() {};
export {
CodeLens,
languages,
StatusBarAlignment,
window,
workspace,
OverviewRulerLane,
Uri,
Range,
Diagnostic,
DiagnosticSeverity,
debug,
commands,
};