index.test.js.snap 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Jest Snapshot v1, https://goo.gl/fbAQLP
  2. exports[`utils Inquirer should make an Input object with validation 1`] = `
  3. Object {
  4. "message": "what is your plugin?",
  5. "name": "plugins",
  6. "type": "input",
  7. "validate": [Function],
  8. }
  9. `;
  10. exports[`utils createArrowFunction should stringify an arrow function 1`] = `"() => 'app.js'"`;
  11. exports[`utils createAssetFilterFunction should stringify an assetFilterFunction 1`] = `
  12. "function (assetFilename) {
  13. return assetFilename.endsWith('.js');
  14. }"
  15. `;
  16. exports[`utils createCommonsChunkPlugin should stringify an commonChunksPlugin 1`] = `"new webpack.optimize.CommonsChunkPlugin({name:'vendor',filename:'vendor-[hash].min.js'})"`;
  17. exports[`utils createDynamicPromise should stringify an array 1`] = `"() => new Promise((resolve) => resolve(['app.js','index.js']))"`;
  18. exports[`utils createDynamicPromise should stringify an single value 1`] = `"() => new Promise((resolve) => resolve('app.js'))"`;
  19. exports[`utils createExternalFunction should stringify an ExternalFunction 1`] = `
  20. "
  21. function (context, request, callback) {
  22. if (/js/.test(request)){
  23. return callback(null, 'commonjs' + request);
  24. }
  25. callback();
  26. }"
  27. `;
  28. exports[`utils createRegularFunction should stringify an regular function 1`] = `
  29. "function () {
  30. return 'app.js'
  31. }"
  32. `;
  33. exports[`utils createRequire should stringify an require statement 1`] = `"const webpack = require('webpack');"`;