Skip to content

Commit f902b6a

Browse files
committed
add types
1 parent c873dff commit f902b6a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/notebooks/deepnote/deepnoteSerializer.unit.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as yaml from 'js-yaml';
44
import { DeepnoteNotebookSerializer } from './deepnoteSerializer';
55
import { DeepnoteNotebookManager } from './deepnoteNotebookManager';
66
import { DeepnoteDataConverter } from './deepnoteDataConverter';
7-
import type { DeepnoteProject } from '../../platform/deepnote/deepnoteTypes';
7+
import type { DeepnoteFile, DeepnoteProject } from '../../platform/deepnote/deepnoteTypes';
88

99
suite('DeepnoteNotebookSerializer', () => {
1010
let serializer: DeepnoteNotebookSerializer;
@@ -63,7 +63,7 @@ suite('DeepnoteNotebookSerializer', () => {
6363
/**
6464
* Helper function to convert a DeepnoteProject object with version to YAML format
6565
*/
66-
function projectToYaml(projectData: { version: string; metadata: any; project: any }): Uint8Array {
66+
function projectToYaml(projectData: DeepnoteFile): Uint8Array {
6767
const yamlString = yaml.dump(projectData);
6868
return new TextEncoder().encode(yamlString);
6969
}
@@ -325,7 +325,7 @@ project:
325325

326326
suite('default notebook selection', () => {
327327
test('should not select Init notebook when other notebooks are available', async () => {
328-
const projectData = {
328+
const projectData: DeepnoteFile = {
329329
version: '1.0',
330330
metadata: {
331331
createdAt: '2023-01-01T00:00:00Z',
@@ -378,7 +378,7 @@ project:
378378
});
379379

380380
test('should select Init notebook when it is the only notebook', async () => {
381-
const projectData = {
381+
const projectData: DeepnoteFile = {
382382
version: '1.0',
383383
metadata: {
384384
createdAt: '2023-01-01T00:00:00Z',
@@ -417,7 +417,7 @@ project:
417417
});
418418

419419
test('should select alphabetically first notebook when no initNotebookId', async () => {
420-
const projectData = {
420+
const projectData: DeepnoteFile = {
421421
version: '1.0',
422422
metadata: {
423423
createdAt: '2023-01-01T00:00:00Z',
@@ -483,7 +483,7 @@ project:
483483
});
484484

485485
test('should sort Init notebook last when multiple notebooks exist', async () => {
486-
const projectData = {
486+
const projectData: DeepnoteFile = {
487487
version: '1.0',
488488
metadata: {
489489
createdAt: '2023-01-01T00:00:00Z',

0 commit comments

Comments
 (0)