@@ -170,6 +170,54 @@ describe('"postcssOptions" option', () => {
170170 expect ( getErrors ( stats ) ) . toMatchSnapshot ( "errors" ) ;
171171 } ) ;
172172
173+ // TODO jest have not good support for ES modules for testing it, tested manually
174+ it . skip ( 'should work with the "parser" option with "Object" value with ESM' , async ( ) => {
175+ const compiler = getCompiler ( "./sss/index.js" , {
176+ postcssOptions : {
177+ parser : path . resolve ( __dirname , "../fixtures/esparser/index.mjs" ) ,
178+ } ,
179+ } ) ;
180+ const stats = await compile ( compiler ) ;
181+
182+ const codeFromBundle = getCodeFromBundle ( "style.sss" , stats ) ;
183+
184+ expect ( codeFromBundle . css ) . toMatchSnapshot ( "css" ) ;
185+ expect ( getWarnings ( stats ) ) . toMatchSnapshot ( "warnings" ) ;
186+ expect ( getErrors ( stats ) ) . toMatchSnapshot ( "errors" ) ;
187+ } ) ;
188+
189+ // TODO jest have not good support for ES modules for testing it, tested manually
190+ it . skip ( 'should work with the "stringifier" option with "Object" value with ESM' , async ( ) => {
191+ const compiler = getCompiler ( "./sss/index.js" , {
192+ postcssOptions : {
193+ stringifier : path . resolve ( __dirname , "../fixtures/esparser/index.mjs" ) ,
194+ } ,
195+ } ) ;
196+ const stats = await compile ( compiler ) ;
197+
198+ const codeFromBundle = getCodeFromBundle ( "style.sss" , stats ) ;
199+
200+ expect ( codeFromBundle . css ) . toMatchSnapshot ( "css" ) ;
201+ expect ( getWarnings ( stats ) ) . toMatchSnapshot ( "warnings" ) ;
202+ expect ( getErrors ( stats ) ) . toMatchSnapshot ( "errors" ) ;
203+ } ) ;
204+
205+ // TODO jest have not good support for ES modules for testing it, tested manually
206+ it . skip ( 'should work with the "syntax" option with "Object" value with ESM' , async ( ) => {
207+ const compiler = getCompiler ( "./sss/index.js" , {
208+ postcssOptions : {
209+ syntax : path . resolve ( __dirname , "../fixtures/esparser/index.mjs" ) ,
210+ } ,
211+ } ) ;
212+ const stats = await compile ( compiler ) ;
213+
214+ const codeFromBundle = getCodeFromBundle ( "style.sss" , stats ) ;
215+
216+ expect ( codeFromBundle . css ) . toMatchSnapshot ( "css" ) ;
217+ expect ( getWarnings ( stats ) ) . toMatchSnapshot ( "warnings" ) ;
218+ expect ( getErrors ( stats ) ) . toMatchSnapshot ( "errors" ) ;
219+ } ) ;
220+
173221 it ( 'should work with the "parser" option with "Function" value' , async ( ) => {
174222 const compiler = getCompiler ( "./sss/index.js" , {
175223 postcssOptions : {
0 commit comments