fix test errors by adding to repo test as well
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
This commit is contained in:
@@ -60,12 +60,9 @@ describe('runBackend', () => {
|
||||
|
||||
// Save original environment
|
||||
originalEnv = { ...process.env };
|
||||
process.env = {};
|
||||
originalPlatform = process.platform;
|
||||
|
||||
// Clear environment variables that we're testing
|
||||
delete process.env.NODE_ENV;
|
||||
delete process.env.NODE_OPTIONS;
|
||||
|
||||
// Mock process.stdin.on to prevent actual stdin reading
|
||||
jest.spyOn(process.stdin, 'on').mockReturnValue(process.stdin);
|
||||
|
||||
|
||||
@@ -289,6 +289,14 @@ export async function command(opts: OptionValues, cmd: Command): Promise<void> {
|
||||
process.env.TZ = 'UTC';
|
||||
}
|
||||
|
||||
// Unless the user explicitly toggles node-snapshot, default to provide --no-node-snapshot to reduce number of steps to run scaffolder
|
||||
// on Node LTS.
|
||||
if (!process.env.NODE_OPTIONS?.includes('--node-snapshot')) {
|
||||
process.env.NODE_OPTIONS = `${
|
||||
process.env.NODE_OPTIONS ? `${process.env.NODE_OPTIONS} ` : ''
|
||||
}--no-node-snapshot`;
|
||||
}
|
||||
|
||||
// This ensures that the process doesn't exit too early before stdout is flushed
|
||||
if (args.includes('--jest-help')) {
|
||||
removeOptionArg(args, '--jest-help');
|
||||
|
||||
Reference in New Issue
Block a user