(env?: Record<string, string>)
| 80 | }) |
| 81 | /// These other cases don't warn because --turbopack is explicitly selected |
| 82 | function noWarnCases(env?: Record<string, string>) { |
| 83 | describe('when webpack is configured and config.turbopack is set', () => { |
| 84 | const { next } = nextTestSetup({ |
| 85 | env, |
| 86 | files: { |
| 87 | ...page, |
| 88 | 'next.config.js': ` |
| 89 | module.exports = { |
| 90 | turbopack: { |
| 91 | |
| 92 | }, |
| 93 | webpack: (config) => { |
| 94 | return config |
| 95 | }, |
| 96 | } |
| 97 | `, |
| 98 | }, |
| 99 | }) |
| 100 | |
| 101 | it('does not warn', async () => { |
| 102 | if (next) await next.render('/') |
| 103 | expect(next.cliOutput).not.toContain(WARNING_MESSAGE) |
| 104 | }) |
| 105 | }) |
| 106 | |
| 107 | describe('when webpack is configured and config.experimental.turbo is set', () => { |
| 108 | const { next } = nextTestSetup({ |
| 109 | files: { |
| 110 | ...page, |
| 111 | 'next.config.js': ` |
| 112 | module.exports = { |
| 113 | experimental: { |
| 114 | turbo: { |
| 115 | rules: { |
| 116 | '*.foo': { |
| 117 | loaders: ['foo-loader'] |
| 118 | } |
| 119 | } |
| 120 | } |
| 121 | }, |
| 122 | webpack: (config) => { |
| 123 | return config |
| 124 | }, |
| 125 | } |
| 126 | `, |
| 127 | }, |
| 128 | }) |
| 129 | |
| 130 | it('does not warn', async () => { |
| 131 | if (next) await next.render('/') |
| 132 | expect(next.cliOutput).not.toContain(WARNING_MESSAGE) |
| 133 | }) |
| 134 | }) |
| 135 | } |
| 136 | } |
| 137 | ) |
no test coverage detected