File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
packages/tailwindcss-language-server/tests/completions Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -814,6 +814,39 @@ defineTest({
814
814
} ,
815
815
} )
816
816
817
+ defineTest ( {
818
+ name : 'v4: class completions show colors when using prefixes' ,
819
+ fs : {
820
+ 'app.css' : css `
821
+ @import 'tailwindcss' prefix(tw);
822
+ ` ,
823
+ } ,
824
+ prepare : async ( { root } ) => ( { client : await createClient ( { root } ) } ) ,
825
+ handle : async ( { client } ) => {
826
+ let document = await client . open ( {
827
+ lang : 'html' ,
828
+ text : '<div class="tw:">' ,
829
+ } )
830
+
831
+ // <div class="tw:">
832
+ // ^
833
+ let completion = await document . completions ( { line : 0 , character : 15 } )
834
+
835
+ expect ( completion ) . toEqual ( {
836
+ isIncomplete : false ,
837
+ items : expect . arrayContaining ( [
838
+ expect . objectContaining ( {
839
+ label : 'bg-black' ,
840
+
841
+ // And it's shown as a color
842
+ kind : CompletionItemKind . Color ,
843
+ documentation : '#000000' ,
844
+ } ) ,
845
+ ] ) ,
846
+ } )
847
+ } ,
848
+ } )
849
+
817
850
defineTest ( {
818
851
name : 'v4: Completions show inside class functions in JS/TS files' ,
819
852
fs : {
You can’t perform that action at this time.
0 commit comments