You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/__snapshots__/cli.test.ts.snap
+104Lines changed: 104 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -626,6 +626,50 @@ my-tool My tool
626
626
"
627
627
`;
628
628
629
+
exports[`cli completion tests for commander > --config option tests > should complete --config option values 1`] =`
630
+
"vite.config.ts Vite config file
631
+
vite.config.js Vite config file
632
+
:4
633
+
"
634
+
`;
635
+
636
+
exports[`cli completion tests for commander > --config option tests > should complete --config option with equals sign 1`] =`
637
+
"vite.config.ts Vite config file
638
+
vite.config.js Vite config file
639
+
:4
640
+
"
641
+
`;
642
+
643
+
exports[`cli completion tests for commander > --config option tests > should complete --config option with partial input 1`] =`
644
+
"vite.config.ts Vite config file
645
+
vite.config.js Vite config file
646
+
:4
647
+
"
648
+
`;
649
+
650
+
exports[`cli completion tests for commander > --config option tests > should complete short flag -c option values 1`] =`
651
+
"vite.config.ts Vite config file
652
+
vite.config.js Vite config file
653
+
:4
654
+
"
655
+
`;
656
+
657
+
exports[`cli completion tests for commander > --config option tests > should complete short flag -c option with partial input 1`] =`
658
+
"vite.config.ts Vite config file
659
+
vite.config.js Vite config file
660
+
:4
661
+
"
662
+
`;
663
+
664
+
exports[`cli completion tests for commander > --config option tests > should not suggest --config after it has been used 1`] =`
665
+
"--version output the version number
666
+
--config Use specified config file
667
+
--mode Set env mode
668
+
--logLevel Specify log level
669
+
:4
670
+
"
671
+
`;
672
+
629
673
exports[`cli completion tests for commander > cli option completion tests > should complete option for partial input '{partial: '--p', expected: '--port'}' 1`] =`
630
674
"--port Specify port
631
675
:4
@@ -660,6 +704,39 @@ exports[`cli completion tests for commander > cli option value handling > should
660
704
"
661
705
`;
662
706
707
+
exports[`cli completion tests for commander > cli option value handling > should resolve config option values correctly 1`] =`
708
+
"vite.config.ts Vite config file
709
+
vite.config.js Vite config file
710
+
:4
711
+
"
712
+
`;
713
+
714
+
exports[`cli completion tests for commander > cli option value handling > should resolve port value correctly 1`] =`
715
+
"3000 Development server port
716
+
:4
717
+
"
718
+
`;
719
+
720
+
exports[`cli completion tests for commander > edge case completions for end with space > should keep suggesting the --port option if user typed partial but didn't end with space 1`] =`
721
+
"--port Specify port
722
+
:4
723
+
"
724
+
`;
725
+
726
+
exports[`cli completion tests for commander > edge case completions for end with space > should suggest port values if user ends with space after \`--port\` 1`] =`
727
+
"3000 Development server port
728
+
8080 Alternative port
729
+
:4
730
+
"
731
+
`;
732
+
733
+
exports[`cli completion tests for commander > edge case completions for end with space > should suggest port values if user typed \`--port=\` and hasn't typed a space or value yet 1`] =`
734
+
"3000 Development server port
735
+
8080 Alternative port
736
+
:4
737
+
"
738
+
`;
739
+
663
740
exports[`cli completion tests for commander > root command option tests > should complete root command --logLevel option values 1`] =`
664
741
"info Info level
665
742
warn Warn level
@@ -719,6 +796,33 @@ production Production mode
719
796
"
720
797
`;
721
798
799
+
exports[`cli completion tests for commander > short flag handling > should handle global short flags 1`] =`
800
+
"-c Use specified config file
801
+
:4
802
+
"
803
+
`;
804
+
805
+
exports[`cli completion tests for commander > short flag handling > should handle short flag value completion 1`] =`
806
+
"-p Specify port
807
+
:4
808
+
"
809
+
`;
810
+
811
+
exports[`cli completion tests for commander > short flag handling > should handle short flag with equals sign 1`] =`
812
+
"3000 Development server port
813
+
:4
814
+
"
815
+
`;
816
+
817
+
exports[`cli completion tests for commander > short flag handling > should not show duplicate options when short flag is used 1`] =`
818
+
"--version output the version number
819
+
--config Use specified config file
820
+
--mode Set env mode
821
+
--logLevel Specify log level
822
+
:4
823
+
"
824
+
`;
825
+
722
826
exports[`cli completion tests for commander > should complete cli options 1`] =`
0 commit comments