|
1 | 1 | import { parse } from '@sveltejs/sv-utils'; |
2 | 2 | import fs from 'node:fs'; |
3 | 3 | import path from 'node:path'; |
| 4 | +import process from 'node:process'; |
4 | 5 | import { exec } from 'tinyexec'; |
5 | 6 | import { beforeAll, describe, expect, it } from 'vitest'; |
6 | 7 |
|
@@ -118,6 +119,25 @@ describe('cli', () => { |
118 | 119 | ); |
119 | 120 | } |
120 | 121 |
|
| 122 | + if (projectName === 'create-with-all-addons' && process.platform !== 'win32') { |
| 123 | + await exec('pnpm', ['install', '--no-frozen-lockfile'], { |
| 124 | + nodeOptions: { stdio: 'pipe', cwd: testOutputPath } |
| 125 | + }); |
| 126 | + await exec('pnpm', ['build'], { |
| 127 | + nodeOptions: { stdio: 'pipe', cwd: testOutputPath } |
| 128 | + }); |
| 129 | + await exec('pnpm', ['auth:schema'], { |
| 130 | + nodeOptions: { stdio: 'pipe', cwd: testOutputPath } |
| 131 | + }); |
| 132 | + const check = await exec('pnpm', ['check'], { |
| 133 | + nodeOptions: { stdio: 'pipe', cwd: testOutputPath } |
| 134 | + }); |
| 135 | + expect( |
| 136 | + check.exitCode, |
| 137 | + `svelte-check failed:\n stdout: ${check.stdout}\n stderr: ${check.stderr}` |
| 138 | + ).toBe(0); |
| 139 | + } |
| 140 | + |
121 | 141 | if (template === 'addon') { |
122 | 142 | // replace sv and sv-utils versions in package.json for tests |
123 | 143 | const packageJsonPath = path.resolve(testOutputPath, 'package.json'); |
|
0 commit comments