( filepath: string, root: string, projectName: string | undefined, pool?: string, viteEnvironment?: string, )
| 194 | } |
| 195 | |
| 196 | export function createFileTask( |
| 197 | filepath: string, |
| 198 | root: string, |
| 199 | projectName: string | undefined, |
| 200 | pool?: string, |
| 201 | viteEnvironment?: string, |
| 202 | ): File { |
| 203 | const path = relative(root, filepath) |
| 204 | const file: File = { |
| 205 | id: generateFileHash(path, projectName), |
| 206 | name: path, |
| 207 | fullName: path, |
| 208 | type: 'suite', |
| 209 | mode: 'queued', |
| 210 | filepath, |
| 211 | tasks: [], |
| 212 | meta: Object.create(null), |
| 213 | projectName, |
| 214 | file: undefined!, |
| 215 | pool, |
| 216 | viteEnvironment, |
| 217 | } |
| 218 | file.file = file |
| 219 | return file |
| 220 | } |
| 221 | |
| 222 | /** |
| 223 | * Generate a unique ID for a file based on its path and project name |
no test coverage detected