mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
Ensure process is seen as TTY for test run
This commit is contained in:
parent
008a9e9a47
commit
b2ead19255
@ -15,6 +15,15 @@ describe('interactiveCli: initializeService', () => {
|
||||
const existingProjectName = 'some-other-service';
|
||||
const newProjectName = 'foo-bar';
|
||||
const newProjectPath = join(fixturesPath, newProjectName);
|
||||
let backupIsTTY;
|
||||
|
||||
before(() => {
|
||||
backupIsTTY = process.stdin.isTTY;
|
||||
process.stdin.isTTY = true;
|
||||
});
|
||||
after(() => {
|
||||
process.stdin.isTTY = backupIsTTY;
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
if (inquirer.prompt.restore) inquirer.prompt.restore();
|
||||
|
||||
@ -31,6 +31,15 @@ describe('interactiveCli: setupAws', () => {
|
||||
const awsProjectPath = join(fixturesPath, 'some-aws-service');
|
||||
const accessKeyId = 'AKIAIOSFODNN7EXAMPLE';
|
||||
const secretAccessKey = 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY';
|
||||
let backupIsTTY;
|
||||
|
||||
before(() => {
|
||||
backupIsTTY = process.stdin.isTTY;
|
||||
process.stdin.isTTY = true;
|
||||
});
|
||||
after(() => {
|
||||
process.stdin.isTTY = backupIsTTY;
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
openBrowserUrls.length = 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user