@@ -12,7 +12,7 @@ import {
1212 it ,
1313 vi ,
1414} from "vitest" ;
15- import type { CellHandle } from "@/components/editor/Cell " ;
15+ import type { CellHandle } from "@/components/editor/notebook-cell " ;
1616import { CellId } from "@/core/cells/ids" ;
1717import { foldAllBulk , unfoldAllBulk } from "@/core/codemirror/editing/commands" ;
1818import { adaptiveLanguageConfiguration } from "@/core/codemirror/language/extension" ;
@@ -2094,9 +2094,9 @@ describe("cell reducer", () => {
20942094 ` ) ;
20952095 } ) ;
20962096
2097- it ( "can create and update a setup cell" , ( ) => {
2097+ it ( "can create and noop- update a setup cell" , ( ) => {
20982098 // Create the setup cell
2099- actions . upsertSetupCell ( { code : "# Setup code" } ) ;
2099+ actions . addSetupCellIfDoesntExist ( { code : "# Setup code" } ) ;
21002100
21012101 // Check that setup cell was created
21022102 expect ( state . cellData [ SETUP_CELL_ID ] . id ) . toBe ( SETUP_CELL_ID ) ;
@@ -2106,17 +2106,17 @@ describe("cell reducer", () => {
21062106 expect ( state . cellIds . inOrderIds ) . toContain ( SETUP_CELL_ID ) ;
21072107
21082108 // Update the setup cell
2109- actions . upsertSetupCell ( { code : "# Updated setup code" } ) ;
2109+ actions . addSetupCellIfDoesntExist ( { code : "# Updated setup code" } ) ;
21102110
21112111 // Check that the same setup cell was updated, not duplicated
2112- expect ( state . cellData [ SETUP_CELL_ID ] . code ) . toBe ( "# Updated setup code" ) ;
2112+ expect ( state . cellData [ SETUP_CELL_ID ] . code ) . toBe ( "# Setup code" ) ;
21132113 expect ( state . cellData [ SETUP_CELL_ID ] . edited ) . toBe ( true ) ;
21142114 expect ( state . cellIds . inOrderIds ) . toContain ( SETUP_CELL_ID ) ;
21152115 } ) ;
21162116
21172117 it ( "can delete and undelete the setup cell" , ( ) => {
21182118 // Create the setup cell
2119- actions . upsertSetupCell ( { code : "# Setup code" } ) ;
2119+ actions . addSetupCellIfDoesntExist ( { code : "# Setup code" } ) ;
21202120
21212121 // Check that setup cell was created
21222122 expect ( state . cellData [ SETUP_CELL_ID ] . id ) . toBe ( SETUP_CELL_ID ) ;
0 commit comments