@@ -213,15 +213,15 @@ describe('editorContext', function () {
213213 } )
214214 } )
215215
216- describe ( 'extractCellsSliceContext ' , function ( ) {
216+ describe ( 'getNotebookCellsSliceContext ' , function ( ) {
217217 it ( 'Should extract content from cells in reverse order up to maxLength from prefix cells' , function ( ) {
218218 const mockCells = [
219219 createNotebookCell ( createMockDocument ( 'First cell content' ) ) ,
220220 createNotebookCell ( createMockDocument ( 'Second cell content' ) ) ,
221221 createNotebookCell ( createMockDocument ( 'Third cell content' ) ) ,
222222 ]
223223
224- const result = EditorContext . extractCellsSliceContext ( mockCells , 100 , 'python' , false )
224+ const result = EditorContext . getNotebookCellsSliceContext ( mockCells , 100 , 'python' , false )
225225 assert . strictEqual ( result , 'First cell content\nSecond cell content\nThird cell content\n' )
226226 } )
227227
@@ -232,7 +232,7 @@ describe('editorContext', function () {
232232 createNotebookCell ( createMockDocument ( 'Third cell content' ) ) ,
233233 ]
234234
235- const result = EditorContext . extractCellsSliceContext ( mockCells , 100 , 'python' , true )
235+ const result = EditorContext . getNotebookCellsSliceContext ( mockCells , 100 , 'python' , true )
236236 assert . strictEqual ( result , 'First cell content\nSecond cell content\nThird cell content\n' )
237237 } )
238238
@@ -244,7 +244,7 @@ describe('editorContext', function () {
244244 createNotebookCell ( createMockDocument ( 'Fourth' ) ) ,
245245 ]
246246 // Should only include part of second cell and the last two cells
247- const result = EditorContext . extractCellsSliceContext ( mockCells , 15 , 'python' , false )
247+ const result = EditorContext . getNotebookCellsSliceContext ( mockCells , 15 , 'python' , false )
248248 assert . strictEqual ( result , 'd\nThird\nFourth\n' )
249249 } )
250250
@@ -257,17 +257,17 @@ describe('editorContext', function () {
257257 ]
258258
259259 // Should only include first cell and part of second cell
260- const result = EditorContext . extractCellsSliceContext ( mockCells , 15 , 'python' , true )
260+ const result = EditorContext . getNotebookCellsSliceContext ( mockCells , 15 , 'python' , true )
261261 assert . strictEqual ( result , 'First\nSecond\nTh' )
262262 } )
263263
264264 it ( 'Should handle empty cells array from prefix cells' , function ( ) {
265- const result = EditorContext . extractCellsSliceContext ( [ ] , 100 , 'python' , false )
265+ const result = EditorContext . getNotebookCellsSliceContext ( [ ] , 100 , 'python' , false )
266266 assert . strictEqual ( result , '' )
267267 } )
268268
269269 it ( 'Should handle empty cells array from suffix cells' , function ( ) {
270- const result = EditorContext . extractCellsSliceContext ( [ ] , 100 , 'python' , true )
270+ const result = EditorContext . getNotebookCellsSliceContext ( [ ] , 100 , 'python' , true )
271271 assert . strictEqual ( result , '' )
272272 } )
273273
@@ -276,7 +276,7 @@ describe('editorContext', function () {
276276 createNotebookCell ( createMockDocument ( '# Heading\nThis is markdown' ) , vscode . NotebookCellKind . Markup ) ,
277277 createNotebookCell ( createMockDocument ( 'def example():\n return "test"' ) ) ,
278278 ]
279- const result = EditorContext . extractCellsSliceContext ( mockCells , 100 , 'python' , false )
279+ const result = EditorContext . getNotebookCellsSliceContext ( mockCells , 100 , 'python' , false )
280280 assert . strictEqual ( result , '# # Heading\n# This is markdown\ndef example():\n return "test"\n' )
281281 } )
282282
@@ -286,7 +286,7 @@ describe('editorContext', function () {
286286 createNotebookCell ( createMockDocument ( 'def example():\n return "test"' ) ) ,
287287 ]
288288
289- const result = EditorContext . extractCellsSliceContext ( mockCells , 100 , 'python' , true )
289+ const result = EditorContext . getNotebookCellsSliceContext ( mockCells , 100 , 'python' , true )
290290 assert . strictEqual ( result , '# # Heading\n# This is markdown\ndef example():\n return "test"\n' )
291291 } )
292292
@@ -295,7 +295,7 @@ describe('editorContext', function () {
295295 createNotebookCell ( createMockDocument ( '# Heading\nThis is markdown' ) , vscode . NotebookCellKind . Markup ) ,
296296 createNotebookCell ( createMockDocument ( 'def example():\n return "test"' ) ) ,
297297 ]
298- const result = EditorContext . extractCellsSliceContext ( mockCells , 100 , 'java' , false )
298+ const result = EditorContext . getNotebookCellsSliceContext ( mockCells , 100 , 'java' , false )
299299 assert . strictEqual ( result , '// # Heading\n// This is markdown\n// def example():\n// return "test"\n' )
300300 } )
301301
@@ -305,7 +305,7 @@ describe('editorContext', function () {
305305 createNotebookCell ( createMockDocument ( 'println(1 + 1);' , 'somefile.ipynb' , 'java' ) ) ,
306306 ]
307307
308- const result = EditorContext . extractCellsSliceContext ( mockCells , 100 , 'java' , true )
308+ const result = EditorContext . getNotebookCellsSliceContext ( mockCells , 100 , 'java' , true )
309309 assert . strictEqual ( result , '// # Heading\n// This is markdown\nprintln(1 + 1);\n' )
310310 } )
311311
@@ -317,7 +317,7 @@ describe('editorContext', function () {
317317 ) ,
318318 createNotebookCell ( createMockDocument ( 'def example():\n return "test"' ) ) ,
319319 ]
320- const result = EditorContext . extractCellsSliceContext ( mockCells , 100 , 'python' , false )
320+ const result = EditorContext . getNotebookCellsSliceContext ( mockCells , 100 , 'python' , false )
321321 assert . strictEqual ( result , '# println(1 + 1);\ndef example():\n return "test"\n' )
322322 } )
323323
@@ -329,7 +329,7 @@ describe('editorContext', function () {
329329 ) ,
330330 createNotebookCell ( createMockDocument ( 'def example():\n return "test"' ) ) ,
331331 ]
332- const result = EditorContext . extractCellsSliceContext ( mockCells , 100 , 'python' , true )
332+ const result = EditorContext . getNotebookCellsSliceContext ( mockCells , 100 , 'python' , true )
333333 assert . strictEqual ( result , '# println(1 + 1);\ndef example():\n return "test"\n' )
334334 } )
335335 } )
0 commit comments