| 149 | } |
| 150 | |
| 151 | function assertRightQwikDepsVersions(appPkgJson: any, qwikVersion: string, starterType: string) { |
| 152 | assert.strictEqual( |
| 153 | appPkgJson.devDependencies['@builder.io/qwik'].includes(qwikVersion), |
| 154 | true, |
| 155 | `Qwik version mismatch for "${starterType}" starter` |
| 156 | ); |
| 157 | if (appPkgJson.devDependencies.hasOwnProperty('@builder.io/qwik-city')) { |
| 158 | assert.strictEqual( |
| 159 | appPkgJson.devDependencies['@builder.io/qwik-city'].includes(qwikVersion), |
| 160 | true, |
| 161 | `Qwik City version mismatch for "${starterType}" starter` |
| 162 | ); |
| 163 | } |
| 164 | if (appPkgJson.devDependencies.hasOwnProperty('eslint-plugin-qwik')) { |
| 165 | assert.strictEqual( |
| 166 | appPkgJson.devDependencies['eslint-plugin-qwik'].includes(qwikVersion), |
| 167 | true, |
| 168 | `ESlint plugin version mismatch for "${starterType}" starter` |
| 169 | ); |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | function cpSync(src: string, dest: string) { |
| 174 | // cpSync() not available until Node v16.7.0 |