removeDeprecatedPlugins.test.js.snap 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // Jest Snapshot v1, https://goo.gl/fbAQLP
  2. exports[`removeDeprecatedPlugins transforms correctly using "removeDeprecatedPlugins-0" data 1`] = `
  3. "// Works for OccurrenceOrderPlugin
  4. module.exports = {}
  5. "
  6. `;
  7. exports[`removeDeprecatedPlugins transforms correctly using "removeDeprecatedPlugins-1" data 1`] = `
  8. "// Works for DedupePlugin
  9. module.exports = {}
  10. "
  11. `;
  12. exports[`removeDeprecatedPlugins transforms correctly using "removeDeprecatedPlugins-2" data 1`] = `
  13. "// Doesn't remove unmatched plugins
  14. module.exports = {
  15. plugins: [new webpack.optimize.UglifyJsPlugin()]
  16. }
  17. "
  18. `;
  19. exports[`removeDeprecatedPlugins transforms correctly using "removeDeprecatedPlugins-3" data 1`] = `
  20. "// This should throw
  21. export default (config) => {
  22. config.plugins.push(new webpack.optimize.UglifyJsPlugin());
  23. config.plugins.push(new webpack.optimize.DedupePlugin());
  24. config.plugins.push(new webpack.optimize.OccurrenceOrderPlugin());
  25. return config
  26. }
  27. "
  28. `;
  29. exports[`removeDeprecatedPlugins transforms correctly using "removeDeprecatedPlugins-4" data 1`] = `
  30. "// This should throw
  31. const inst = new webpack.optimize.OccurrenceOrderPlugin()
  32. export default (config) => {
  33. config.plugins = [
  34. inst
  35. ]
  36. return config
  37. }
  38. "
  39. `;