@@ -105,6 +105,20 @@ withFixture('basic', (c) => {
105
105
{ label : 'bg-[hsl(0,100%,50%)]' } ,
106
106
] )
107
107
} )
108
+
109
+ test . concurrent ( 'arbitrary oklch color' , async ( { expect } ) => {
110
+ let textDocument = await c . openDocument ( { text : '<div class="bg-[oklch(44.05%_0.16_303)]">' } )
111
+ let res = await c . sendRequest ( 'textDocument/colorPresentation' , {
112
+ color : { red : 1 , green : 0 , blue : 0 , alpha : 1 } ,
113
+ textDocument,
114
+ range : {
115
+ start : { line : 0 , character : 12 } ,
116
+ end : { line : 0 , character : 39 } ,
117
+ } ,
118
+ } )
119
+
120
+ expect ( res ) . toEqual ( [ ] )
121
+ } )
108
122
} )
109
123
110
124
withFixture ( 'v4/basic' , ( c ) => {
@@ -211,4 +225,18 @@ withFixture('v4/basic', (c) => {
211
225
{ label : 'bg-[hsl(0,100%,50%)]' } ,
212
226
] )
213
227
} )
228
+
229
+ test . concurrent ( 'arbitrary oklch color' , async ( { expect } ) => {
230
+ let textDocument = await c . openDocument ( { text : '<div class="bg-[oklch(44.05%_0.16_303)]">' } )
231
+ let res = await c . sendRequest ( 'textDocument/colorPresentation' , {
232
+ color : { red : 1 , green : 0 , blue : 0 , alpha : 1 } ,
233
+ textDocument,
234
+ range : {
235
+ start : { line : 0 , character : 12 } ,
236
+ end : { line : 0 , character : 39 } ,
237
+ } ,
238
+ } )
239
+
240
+ expect ( res ) . toEqual ( [ ] )
241
+ } )
214
242
} )
0 commit comments