(...args)
| 56 | return { |
| 57 | ...path, |
| 58 | resolve(...args) { |
| 59 | if (args[0] === '__jest__') { |
| 60 | return path.join(...args.filter(Boolean)); |
| 61 | } |
| 62 | |
| 63 | const resolved = path.resolve(...args); |
| 64 | if (resolved.includes('__jest__')) { |
| 65 | const li = resolved.lastIndexOf('__jest__'); |
| 66 | return resolved.substr(li); |
| 67 | } |
| 68 | |
| 69 | // handle resolutions with __dirname |
| 70 | // used in base config's resolveLoader |
| 71 | const root = path.resolve(__dirname, '..'); |
| 72 | if (resolved.startsWith(root)) { |
| 73 | const newPath = resolved.replace(root, '__jest__'); |
| 74 | |
| 75 | if (newPath.startsWith('__jest__/src')) { |
| 76 | return newPath.replace( |
| 77 | '__jest__/src', |
| 78 | '__jest__/node_modules/@nativescript/webpack/dist' |
| 79 | ); |
| 80 | } |
| 81 | |
| 82 | return newPath; |
| 83 | } |
| 84 | |
| 85 | return resolved; |
| 86 | }, |
| 87 | }; |
| 88 | }); |
| 89 |
no test coverage detected