diff --git a/test/function/bundle-transformer-async/_config.js b/test/function/bundle-transformer-async/_config.js new file mode 100644 index 00000000000..66873b6b257 --- /dev/null +++ b/test/function/bundle-transformer-async/_config.js @@ -0,0 +1,22 @@ +module.exports = { + description: 'bundle transformers can be asynchronous', + options: { + plugins: [ + { + transformBundle: function ( code ) { + return Promise.resolve( code.replace( 'x', 1 ) ); + } + }, + { + transformBundle: function ( code ) { + return code.replace( '1', 2 ); + } + }, + { + transformBundle: function ( code ) { + return Promise.resolve( code.replace( '2', 3 ) ); + } + } + ] + } +}; diff --git a/test/function/bundle-transformer-async/main.js b/test/function/bundle-transformer-async/main.js new file mode 100644 index 00000000000..a09d9954e25 --- /dev/null +++ b/test/function/bundle-transformer-async/main.js @@ -0,0 +1 @@ +assert.equal( x, 3 );