File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -579,6 +579,14 @@ function disableCoverage(): void
579579
580580This method disables coverage collection for tests that run afterwards .
581581
582+ ## getSeed < Version > 4.0 .0 < / Version > {#getseed }
583+
584+ ` ` ` ts
585+ function getSeed(): number | null
586+ ` ` `
587+
588+ Returns the seed , if tests are running in a random order .
589+
582590## experimental_parseSpecification < Version > 4.0 .0 < / Version > <Badge type =" warning" >experimental < / Badge > {#parsespecification }
583591
584592` ` ` ts
Original file line number Diff line number Diff line change @@ -502,6 +502,13 @@ export class Vitest {
502502 }
503503 }
504504
505+ /**
506+ * Returns the seed, if tests are running in a random order.
507+ */
508+ public getSeed ( ) : number | null {
509+ return this . config . sequence . seed ?? null
510+ }
511+
505512 /** @internal */
506513 public async _reportFileTask ( file : File ) : Promise < void > {
507514 const project = this . getProjectByName ( file . projectName || '' )
You can’t perform that action at this time.
0 commit comments