@@ -24,8 +24,14 @@ export default async function () {
2424 }
2525
2626 // Tailwind directives should be unprocessed with missing package
27- await expectFileToMatch ( 'dist/test-project/styles.css' , '@tailwind base; @tailwind components;' ) ;
28- await expectFileToMatch ( 'dist/test-project/main.js' , '@tailwind base; @tailwind components;' ) ;
27+ await expectFileToMatch (
28+ 'dist/test-project/styles.css' ,
29+ / @ t a i l w i n d b a s e ; \s + @ t a i l w i n d c o m p o n e n t s ; / ,
30+ ) ;
31+ await expectFileToMatch (
32+ 'dist/test-project/main.js' ,
33+ / @ t a i l w i n d b a s e ; (?: \\ n | \s * ) @ t a i l w i n d c o m p o n e n t s ; / ,
34+ ) ;
2935
3036 // Install Tailwind
3137 await installPackage ( 'tailwindcss@2' ) ;
@@ -37,19 +43,28 @@ export default async function () {
3743 await expectFileToMatch ( 'dist/test-project/styles.css' , / : : p l a c e h o l d e r / ) ;
3844 await expectFileToMatch ( 'dist/test-project/main.js' , / : : p l a c e h o l d e r / ) ;
3945 await expectToFail ( ( ) =>
40- expectFileToMatch ( 'dist/test-project/styles.css' , ' @tailwind base; @tailwind components;' ) ,
46+ expectFileToMatch ( 'dist/test-project/styles.css' , / @ t a i l w i n d b a s e ; \s + @ t a i l w i n d c o m p o n e n t s ; / ) ,
4147 ) ;
4248 await expectToFail ( ( ) =>
43- expectFileToMatch ( 'dist/test-project/main.js' , '@tailwind base; @tailwind components;' ) ,
49+ expectFileToMatch (
50+ 'dist/test-project/main.js' ,
51+ / @ t a i l w i n d b a s e ; (?: \\ n | \s * ) @ t a i l w i n d c o m p o n e n t s ; / ,
52+ ) ,
4453 ) ;
4554
4655 // Remove configuration file
4756 await deleteFile ( 'tailwind.config.js' ) ;
4857
4958 // Ensure Tailwind is disabled when no configuration file is present
5059 await ng ( 'build' , '--configuration=development' ) ;
51- await expectFileToMatch ( 'dist/test-project/styles.css' , '@tailwind base; @tailwind components;' ) ;
52- await expectFileToMatch ( 'dist/test-project/main.js' , '@tailwind base; @tailwind components;' ) ;
60+ await expectFileToMatch (
61+ 'dist/test-project/styles.css' ,
62+ / @ t a i l w i n d b a s e ; \s + @ t a i l w i n d c o m p o n e n t s ; / ,
63+ ) ;
64+ await expectFileToMatch (
65+ 'dist/test-project/main.js' ,
66+ / @ t a i l w i n d b a s e ; (?: \\ n | \s * ) @ t a i l w i n d c o m p o n e n t s ; / ,
67+ ) ;
5368
5469 // Uninstall Tailwind
5570 await uninstallPackage ( 'tailwindcss' ) ;
0 commit comments