@@ -82,38 +82,4 @@ describe("buildDeviceFlowDisplay", () => {
8282 // Without browser: extra copy-hint line + blank line
8383 expect ( withoutBrowser . length ) . toBeGreaterThan ( withBrowser . length ) ;
8484 } ) ;
85-
86- test ( "includes user code as inline code span" , ( ) => {
87- const lines = buildDeviceFlowDisplay ( CODE , URL , true , false ) ;
88- const joined = lines . join ( "\n" ) ;
89- expect ( joined ) . toContain ( `\`${ CODE } \`` ) ;
90- } ) ;
91-
92- test ( "omits copy hint when browser opened" , ( ) => {
93- const lines = buildDeviceFlowDisplay ( CODE , URL , true , true ) ;
94- const joined = lines . join ( "\n" ) ;
95- expect ( joined ) . not . toContain ( "Copy the URL above" ) ;
96- expect ( joined ) . not . toContain ( "to copy URL" ) ;
97- } ) ;
98-
99- test ( "shows copy hint when browser did not open (TTY)" , ( ) => {
100- const lines = buildDeviceFlowDisplay ( CODE , URL , false , true ) ;
101- const joined = lines . join ( "\n" ) ;
102- expect ( joined ) . toContain ( "Copy the URL above to sign in." ) ;
103- expect ( joined ) . toContain ( "to copy URL" ) ;
104- } ) ;
105-
106- test ( "shows copy hint without keyboard shortcut in non-TTY" , ( ) => {
107- const lines = buildDeviceFlowDisplay ( CODE , URL , false , false ) ;
108- const joined = lines . join ( "\n" ) ;
109- expect ( joined ) . toContain ( "Copy the URL above to sign in." ) ;
110- expect ( joined ) . not . toContain ( "to copy URL" ) ;
111- } ) ;
112-
113- test ( "returns more lines when browser did not open" , ( ) => {
114- const withBrowser = buildDeviceFlowDisplay ( CODE , URL , true , false ) ;
115- const withoutBrowser = buildDeviceFlowDisplay ( CODE , URL , false , false ) ;
116- // Without browser: extra copy-hint line + blank line
117- expect ( withoutBrowser . length ) . toBeGreaterThan ( withBrowser . length ) ;
118- } ) ;
11985} ) ;
0 commit comments