Skip to content

Commit a00614f

Browse files
committed
wip
1 parent ca488cd commit a00614f

File tree

1 file changed

+31
-12
lines changed

1 file changed

+31
-12
lines changed

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

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ testFixture('v4/invalid-import-order', [
232232
// ---
233233

234234
testLocator({
235-
name: 'Sass files are not supported detected with v4',
235+
name: 'Sass files are not detected with v4',
236236
fs: {
237237
'package.json': json`
238238
{
@@ -248,18 +248,35 @@ testLocator({
248248
@use 'tailwindcss';
249249
`,
250250
},
251+
expected: [],
252+
})
251253

252-
// We want to ignore `node_modules` folders otherwise we'll pick up the
253-
// default Tailwind CSS `index.css` file as a CSS-based config.
254-
settings: {
255-
tailwindCSS: {
256-
files: {
257-
exclude: ['**/node_modules'],
258-
},
259-
} as any,
254+
testLocator({
255+
name: 'Sass files are detected with v3',
256+
fs: {
257+
'package.json': json`
258+
{
259+
"dependencies": {
260+
"tailwindcss": "^3.4.17"
261+
}
262+
}
263+
`,
264+
'tailwind.admin.config.js': js`
265+
module.exports = {
266+
content: ['./src/**/*.{html,js}'],
267+
}
268+
`,
269+
'src/app.scss': scss`
270+
@config '../tailwind.admin.config.js';
271+
`,
260272
},
261-
262-
expected: [],
273+
expected: [
274+
{
275+
version: '3.4.17',
276+
config: '/tailwind.admin.config.js',
277+
content: ['/src/**/*.{html,js}'],
278+
},
279+
],
263280
})
264281

265282
// ---
@@ -303,7 +320,9 @@ async function prepare({ root }: TestUtils) {
303320
let defaultSettings = {
304321
tailwindCSS: {
305322
files: {
306-
exclude: [],
323+
// We want to ignore `node_modules` folders otherwise we'll pick up
324+
// configs from there and we don't want that.
325+
exclude: ['**/node_modules'],
307326
},
308327
},
309328
} as Settings

0 commit comments

Comments
 (0)