|
1 | 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP |
2 | 2 |
|
| 3 | +exports[`loader should allow adding dependencies and contextDependencies via loader context: errors 1`] = `Array []`; |
| 4 | + |
| 5 | +exports[`loader should allow adding dependencies and contextDependencies via loader context: result 1`] = ` |
| 6 | +"{ |
| 7 | + \\"content\\": \\"module.exports = \\\\\\"hello world\\\\\\";\\", |
| 8 | + \\"map\\": null, |
| 9 | + \\"meta\\": null, |
| 10 | + \\"dependencies\\": [ |
| 11 | + \\"test/fixtures/dependencies-via-context.js\\", |
| 12 | + \\"test/fixtures/args.js\\", |
| 13 | + \\"test/fixtures/simple.js\\" |
| 14 | + ], |
| 15 | + \\"contextDependencies\\": [ |
| 16 | + \\"test/fixtures\\" |
| 17 | + ] |
| 18 | +}" |
| 19 | +`; |
| 20 | + |
| 21 | +exports[`loader should allow adding dependencies and contextDependencies via loader context: warnings 1`] = `Array []`; |
| 22 | + |
3 | 23 | exports[`loader should call the function with the loader options: errors 1`] = `Array []`; |
4 | 24 |
|
5 | 25 | exports[`loader should call the function with the loader options: result 1`] = ` |
@@ -101,6 +121,31 @@ exports[`loader should has module.parent: result 1`] = ` |
101 | 121 |
|
102 | 122 | exports[`loader should has module.parent: warnings 1`] = `Array []`; |
103 | 123 |
|
| 124 | +exports[`loader should keep dependencies if errors are emitted: errors 1`] = ` |
| 125 | +Array [ |
| 126 | + "ModuleError: Module Error (from /src/index.js): |
| 127 | +(Emitted value instead of an instance of Error) Error: Calling the function failed", |
| 128 | +] |
| 129 | +`; |
| 130 | + |
| 131 | +exports[`loader should keep dependencies if errors are emitted: result 1`] = ` |
| 132 | +"{ |
| 133 | + \\"content\\": \\"module.exports = \\\\\\"hello world\\\\\\";\\", |
| 134 | + \\"map\\": null, |
| 135 | + \\"meta\\": null, |
| 136 | + \\"dependencies\\": [ |
| 137 | + \\"test/fixtures/error-emitted-with-dependencies.js\\", |
| 138 | + \\"test/fixtures/args.js\\", |
| 139 | + \\"test/fixtures/simple.js\\" |
| 140 | + ], |
| 141 | + \\"contextDependencies\\": [ |
| 142 | + \\"test/fixtures\\" |
| 143 | + ] |
| 144 | +}" |
| 145 | +`; |
| 146 | + |
| 147 | +exports[`loader should keep dependencies if errors are emitted: warnings 1`] = `Array []`; |
| 148 | + |
104 | 149 | exports[`loader should not swallow function call errors (async): errors 1`] = ` |
105 | 150 | Array [ |
106 | 151 | "ModuleBuildError: Module build failed (from /src/index.js): |
|
0 commit comments