index.test.js.snap 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. // Jest Snapshot v1, https://goo.gl/fbAQLP
  2. exports[`transform should not transform if no transformations defined:
  3. module.exports = {
  4. devtool: 'eval',
  5. entry: [
  6. './src/index'
  7. ],
  8. output: {
  9. path: path.join(__dirname, 'dist'),
  10. filename: 'index.js'
  11. },
  12. module: {
  13. loaders: [{
  14. test: /.js$/,
  15. loaders: ['babel'],
  16. include: path.join(__dirname, 'src')
  17. }]
  18. },
  19. resolve: {
  20. root: path.resolve('/src'),
  21. modules: ['node_modules']
  22. },
  23. plugins: [
  24. new webpack.optimize.UglifyJsPlugin(),
  25. new webpack.optimize.OccurrenceOrderPlugin()
  26. ],
  27. debug: true
  28. };
  29. 1`] = `
  30. "
  31. module.exports = {
  32. devtool: 'eval',
  33. entry: [
  34. './src/index'
  35. ],
  36. output: {
  37. path: path.join(__dirname, 'dist'),
  38. filename: 'index.js'
  39. },
  40. module: {
  41. loaders: [{
  42. test: /.js$/,
  43. loaders: ['babel'],
  44. include: path.join(__dirname, 'src')
  45. }]
  46. },
  47. resolve: {
  48. root: path.resolve('/src'),
  49. modules: ['node_modules']
  50. },
  51. plugins: [
  52. new webpack.optimize.UglifyJsPlugin(),
  53. new webpack.optimize.OccurrenceOrderPlugin()
  54. ],
  55. debug: true
  56. };
  57. "
  58. `;
  59. exports[`transform should respect recast options 1`] = `
  60. "
  61. module.exports = {
  62. devtool: 'eval',
  63. entry: [
  64. './src/index'
  65. ],
  66. output: {
  67. path: path.join(__dirname, 'dist'),
  68. filename: 'index.js'
  69. },
  70. module: {
  71. rules: [{
  72. test: /.js$/,
  73. use: [{
  74. loader: \\"babel-loader\\",
  75. }],
  76. include: path.join(__dirname, 'src')
  77. }]
  78. },
  79. resolve: {
  80. modules: ['node_modules', path.resolve('/src')],
  81. },
  82. plugins: [new webpack.LoaderOptionsPlugin({
  83. debug: true,
  84. })],
  85. optimization: {
  86. minimize: true,
  87. }
  88. };
  89. "
  90. `;
  91. exports[`transform should transform only using specified transformations 1`] = `
  92. "
  93. module.exports = {
  94. devtool: 'eval',
  95. entry: [
  96. './src/index'
  97. ],
  98. output: {
  99. path: path.join(__dirname, 'dist'),
  100. filename: 'index.js'
  101. },
  102. module: {
  103. rules: [{
  104. test: /.js$/,
  105. use: [{
  106. loader: 'babel-loader'
  107. }],
  108. include: path.join(__dirname, 'src')
  109. }]
  110. },
  111. resolve: {
  112. root: path.resolve('/src'),
  113. modules: ['node_modules']
  114. },
  115. plugins: [
  116. new webpack.optimize.UglifyJsPlugin(),
  117. new webpack.optimize.OccurrenceOrderPlugin()
  118. ],
  119. debug: true
  120. };
  121. "
  122. `;
  123. exports[`transform should transform using all transformations 1`] = `
  124. "
  125. module.exports = {
  126. devtool: 'eval',
  127. entry: [
  128. './src/index'
  129. ],
  130. output: {
  131. path: path.join(__dirname, 'dist'),
  132. filename: 'index.js'
  133. },
  134. module: {
  135. rules: [{
  136. test: /.js$/,
  137. use: [{
  138. loader: 'babel-loader'
  139. }],
  140. include: path.join(__dirname, 'src')
  141. }]
  142. },
  143. resolve: {
  144. modules: ['node_modules', path.resolve('/src')]
  145. },
  146. plugins: [new webpack.LoaderOptionsPlugin({
  147. debug: true
  148. })],
  149. optimization: {
  150. minimize: true
  151. }
  152. };
  153. "
  154. `;