@@ -28,6 +28,7 @@ import * as auth from "../../../src/lib/db/auth.js";
2828// biome-ignore lint/performance/noNamespaceImport: spyOn requires object reference
2929import * as userDb from "../../../src/lib/db/user.js" ;
3030import { WizardError } from "../../../src/lib/errors.js" ;
31+ import { stripAnsi } from "../../../src/lib/formatters/plain-detect.js" ;
3132// biome-ignore lint/performance/noNamespaceImport: spyOn requires object reference
3233import * as fmt from "../../../src/lib/init/formatters.js" ;
3334// biome-ignore lint/performance/noNamespaceImport: spyOn requires object reference
@@ -628,8 +629,8 @@ describe("runWizard", { timeout: TEST_TIMEOUT_MS }, () => {
628629 ) as string [ ] | undefined ;
629630 expect ( call ) . toBeDefined ( ) ;
630631 const msg = call ?. [ 0 ] ?? "" ;
631- expect ( msg . length ) . toBeLessThanOrEqual ( 36 ) ;
632- expect ( msg . endsWith ( "…" ) ) . toBe ( true ) ;
632+ expect ( stripAnsi ( msg ) . length ) . toBeLessThanOrEqual ( 36 ) ;
633+ expect ( stripAnsi ( msg ) . endsWith ( "…" ) ) . toBe ( true ) ;
633634 } finally {
634635 Object . defineProperty ( process . stdout , "columns" , {
635636 value : origColumns ,
@@ -939,7 +940,7 @@ describe("describeLocalOp", () => {
939940 params : { paths : [ "src/settings.py" ] } ,
940941 } )
941942 ) ;
942- expect ( msg ) . toBe ( "Reading settings.py..." ) ;
943+ expect ( msg ) . toBe ( "Reading ` settings.py` ..." ) ;
943944 } ) ;
944945
945946 test ( "two files shows both basenames" , ( ) => {
@@ -949,7 +950,7 @@ describe("describeLocalOp", () => {
949950 params : { paths : [ "src/settings.py" , "src/urls.py" ] } ,
950951 } )
951952 ) ;
952- expect ( msg ) . toBe ( "Reading settings.py, urls.py..." ) ;
953+ expect ( msg ) . toBe ( "Reading ` settings.py`, ` urls.py` ..." ) ;
953954 } ) ;
954955
955956 test ( "three+ files shows count and first two basenames" , ( ) => {
@@ -961,7 +962,7 @@ describe("describeLocalOp", () => {
961962 } ,
962963 } )
963964 ) ;
964- expect ( msg ) . toBe ( "Reading 4 files (one.py, two.py, ...)..." ) ;
965+ expect ( msg ) . toBe ( "Reading 4 files (` one.py`, ` two.py` , ...)..." ) ;
965966 } ) ;
966967
967968 test ( "empty paths array" , ( ) => {
@@ -980,7 +981,7 @@ describe("describeLocalOp", () => {
980981 params : { paths : [ "requirements.txt" ] } ,
981982 } )
982983 ) ;
983- expect ( msg ) . toBe ( "Checking requirements.txt..." ) ;
984+ expect ( msg ) . toBe ( "Checking ` requirements.txt` ..." ) ;
984985 } ) ;
985986
986987 test ( "multiple files shows count" , ( ) => {
@@ -990,7 +991,7 @@ describe("describeLocalOp", () => {
990991 params : { paths : [ "a.py" , "b.py" , "c.py" ] } ,
991992 } )
992993 ) ;
993- expect ( msg ) . toBe ( "Checking 3 files (a.py, b.py, ...)..." ) ;
994+ expect ( msg ) . toBe ( "Checking 3 files (` a.py`, ` b.py` , ...)..." ) ;
994995 } ) ;
995996 } ) ;
996997
@@ -1004,7 +1005,7 @@ describe("describeLocalOp", () => {
10041005 } ,
10051006 } )
10061007 ) ;
1007- expect ( msg ) . toBe ( "Creating sentry.py..." ) ;
1008+ expect ( msg ) . toBe ( "Creating ` sentry.py` ..." ) ;
10081009 } ) ;
10091010
10101011 test ( "single modify shows verb and basename" , ( ) => {
@@ -1016,7 +1017,7 @@ describe("describeLocalOp", () => {
10161017 } ,
10171018 } )
10181019 ) ;
1019- expect ( msg ) . toBe ( "Modifying settings.py..." ) ;
1020+ expect ( msg ) . toBe ( "Modifying ` settings.py` ..." ) ;
10201021 } ) ;
10211022
10221023 test ( "single delete shows verb and basename" , ( ) => {
@@ -1028,7 +1029,7 @@ describe("describeLocalOp", () => {
10281029 } ,
10291030 } )
10301031 ) ;
1031- expect ( msg ) . toBe ( "Deleting old.js..." ) ;
1032+ expect ( msg ) . toBe ( "Deleting ` old.js` ..." ) ;
10321033 } ) ;
10331034
10341035 test ( "multiple patches shows count and breakdown" , ( ) => {
@@ -1056,7 +1057,7 @@ describe("describeLocalOp", () => {
10561057 params : { commands : [ "pip install sentry-sdk" ] } ,
10571058 } )
10581059 ) ;
1059- expect ( msg ) . toBe ( "Running pip install sentry-sdk..." ) ;
1060+ expect ( msg ) . toBe ( "Running ` pip install sentry-sdk` ..." ) ;
10601061 } ) ;
10611062
10621063 test ( "multiple commands shows count and first" , ( ) => {
@@ -1068,7 +1069,7 @@ describe("describeLocalOp", () => {
10681069 } ,
10691070 } )
10701071 ) ;
1071- expect ( msg ) . toBe ( "Running 2 commands (pip install sentry-sdk, ...)..." ) ;
1072+ expect ( msg ) . toBe ( "Running 2 commands (` pip install sentry-sdk` , ...)..." ) ;
10721073 } ) ;
10731074 } ) ;
10741075
@@ -1089,7 +1090,7 @@ describe("describeLocalOp", () => {
10891090 params : { name : "my-app" , platform : "python-django" } ,
10901091 } )
10911092 ) ;
1092- expect ( msg ) . toBe ( ' Creating project " my-app" (python-django)...' ) ;
1093+ expect ( msg ) . toBe ( " Creating project ` my-app` (python-django)..." ) ;
10931094 } ) ;
10941095 } ) ;
10951096} ) ;
0 commit comments