@@ -178,19 +178,19 @@ describe('editorContext', function () {
178
178
describe ( 'getNotebookCellContext' , function ( ) {
179
179
it ( 'Should return cell text for python code cells when language is python' , function ( ) {
180
180
const mockCodeCell = createNotebookCell ( createMockDocument ( 'def example():\n return "test"' ) )
181
- const result = EditorContext . extractSingleCellContext ( mockCodeCell , 'python' )
181
+ const result = EditorContext . getNotebookCellContext ( mockCodeCell , 'python' )
182
182
assert . strictEqual ( result , 'def example():\n return "test"' )
183
183
} )
184
184
185
185
it ( 'Should return java comments for python code cells when language is java' , function ( ) {
186
186
const mockCodeCell = createNotebookCell ( createMockDocument ( 'def example():\n return "test"' ) )
187
- const result = EditorContext . extractSingleCellContext ( mockCodeCell , 'java' )
187
+ const result = EditorContext . getNotebookCellContext ( mockCodeCell , 'java' )
188
188
assert . strictEqual ( result , '// def example():\n// return "test"' )
189
189
} )
190
190
191
191
it ( 'Should return python comments for java code cells when language is python' , function ( ) {
192
192
const mockCodeCell = createNotebookCell ( createMockDocument ( 'println(1 + 1);' , 'somefile.ipynb' , 'java' ) )
193
- const result = EditorContext . extractSingleCellContext ( mockCodeCell , 'python' )
193
+ const result = EditorContext . getNotebookCellContext ( mockCodeCell , 'python' )
194
194
assert . strictEqual ( result , '# println(1 + 1);' )
195
195
} )
196
196
@@ -199,7 +199,7 @@ describe('editorContext', function () {
199
199
createMockDocument ( '# Heading\nThis is a markdown cell' ) ,
200
200
vscode . NotebookCellKind . Markup
201
201
)
202
- const result = EditorContext . extractSingleCellContext ( mockMarkdownCell , 'python' )
202
+ const result = EditorContext . getNotebookCellContext ( mockMarkdownCell , 'python' )
203
203
assert . strictEqual ( result , '# # Heading\n# This is a markdown cell' )
204
204
} )
205
205
@@ -208,7 +208,7 @@ describe('editorContext', function () {
208
208
createMockDocument ( '# Heading\nThis is a markdown cell' ) ,
209
209
vscode . NotebookCellKind . Markup
210
210
)
211
- const result = EditorContext . extractSingleCellContext ( mockMarkdownCell , 'java' )
211
+ const result = EditorContext . getNotebookCellContext ( mockMarkdownCell , 'java' )
212
212
assert . strictEqual ( result , '// # Heading\n// This is a markdown cell' )
213
213
} )
214
214
} )
0 commit comments