Skip to content

Commit fb6f8b0

Browse files
committed
Add test for negative sources
1 parent 537b23d commit fb6f8b0

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

packages/tailwindcss-language-server/src/project-locator.test.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,40 @@ testLocator({
265265
],
266266
})
267267

268+
testLocator({
269+
// TODO: Enable once v4.1 is released
270+
options: { skip: true },
271+
name: 'automatic content detection with negative custom sources',
272+
fs: {
273+
'package.json': json`
274+
{
275+
"dependencies": {
276+
"tailwindcss": "0.0.0-insiders.3e53e25",
277+
"@tailwindcss/oxide": "0.0.0-insiders.3e53e25"
278+
}
279+
}
280+
`,
281+
'src/app.css': css`
282+
@import 'tailwindcss';
283+
@source './**/*.html';
284+
@source not './ignored.html';
285+
`,
286+
'src/index.html': html`<div class="underline"></div>`,
287+
'src/ignored.html': html`<div class="flex"></div>`,
288+
},
289+
expected: [
290+
{
291+
config: '/src/app.css',
292+
content: [
293+
'/*',
294+
'/package.json',
295+
'/src/index.html',
296+
'/src/{**/*.html,**/*.{aspx,astro,cjs,cts,eex,erb,gjs,gts,haml,handlebars,hbs,heex,html,jade,js,json,jsx,liquid,md,mdx,mjs,mts,mustache,njk,nunjucks,php,pug,py,razor,rb,rhtml,rs,slim,svelte,tpl,ts,tsx,twig,vue}}',
297+
],
298+
},
299+
],
300+
})
301+
268302
testFixture('v4/missing-files', [
269303
//
270304
{

0 commit comments

Comments
 (0)