Add logged Faker seed when none is set in tests (#9140)
This will hopefully make it easier to reproduce test failures that happen intermittently, especially in CI.
This commit is contained in:
parent
059e87c862
commit
8aacab513b
|
@ -11,6 +11,10 @@ if (config.environment !== 'test' || searchIncludesSeed) {
|
||||||
} else {
|
} else {
|
||||||
faker.seed(1);
|
faker.seed(1);
|
||||||
}
|
}
|
||||||
|
} else if (config.environment === 'test') {
|
||||||
|
const randomSeed = faker.random.number();
|
||||||
|
console.log(`No seed specified with faker-seed query parameter, seeding Faker with ${randomSeed}`);
|
||||||
|
faker.seed(randomSeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default faker;
|
export default faker;
|
||||||
|
|
Loading…
Reference in New Issue