Skip to content

Commit 30b323b

Browse files
committed
fixed tests
1 parent 3f2ff99 commit 30b323b

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎src/test/datascience/export/exportManagerFileOpener.unit.test.ts‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,20 @@ suite('Data Science - Export File Opener', () => {
4848

4949
test('No file is opened if nothing is exported', async () => {
5050
when(exporter.export(anything(), anything())).thenResolve();
51-
await fileOpener.export(ExportFormat.python, model);
51+
await fileOpener.export(ExportFormat.python, model, undefined);
5252

5353
verify(documentManager.showTextDocument(anything())).never();
5454
});
5555
test('Python File is opened if exported', async () => {
5656
const uri = Uri.file('test.python');
57-
when(exporter.export(anything(), anything())).thenResolve(uri);
58-
await fileOpener.export(ExportFormat.python, model);
57+
when(exporter.export(anything(), anything(), anything())).thenResolve(uri);
58+
await fileOpener.export(ExportFormat.python, model, undefined);
5959

6060
verify(documentManager.showTextDocument(anything())).once();
6161
});
6262
test('HTML File opened if yes button pressed', async () => {
6363
const uri = Uri.file('test.html');
64-
when(exporter.export(anything(), anything())).thenResolve(uri);
64+
when(exporter.export(anything(), anything(), anything())).thenResolve(uri);
6565
when(applicationShell.showInformationMessage(anything(), anything(), anything())).thenReturn(
6666
Promise.resolve(getLocString('DataScience.openExportFileYes', 'Yes'))
6767
);
@@ -82,14 +82,14 @@ suite('Data Science - Export File Opener', () => {
8282
verify(browserService.launch(anything())).never();
8383
});
8484
test('Exporting to PDF displays message if operation fails', async () => {
85-
when(exporter.export(anything(), anything())).thenThrow(new Error('Export failed...'));
85+
when(exporter.export(anything(), anything(), anything())).thenThrow(new Error('Export failed...'));
8686
when(applicationShell.showErrorMessage(anything())).thenResolve();
8787
await fileOpener.export(ExportFormat.pdf, model);
8888
verify(applicationShell.showErrorMessage(anything())).once();
8989
});
9090
test('PDF File opened if yes button pressed', async () => {
9191
const uri = Uri.file('test.pdf');
92-
when(exporter.export(anything(), anything())).thenResolve(uri);
92+
when(exporter.export(anything(), anything(), anything())).thenResolve(uri);
9393
when(applicationShell.showInformationMessage(anything(), anything(), anything())).thenReturn(
9494
Promise.resolve(getLocString('DataScience.openExportFileYes', 'Yes'))
9595
);

0 commit comments

Comments
 (0)