Skip to content

Commit

Permalink
test(integration): Update test + framework code
Browse files Browse the repository at this point in the history
Update init.js to provide cleaner output indicating the TRUE/FALSE state
of the "Falcon Test Show" vars.  Stop skipping the first test in
install.test.ts. Minor change in debug output in cmd.ts.

Related to: #133
  • Loading branch information
VivekMChawla committed Mar 15, 2019
1 parent 21a3191 commit aa381e8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 17 deletions.
2 changes: 1 addition & 1 deletion test/helpers/cmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export async function executeWithInput(processPath:string, args:string[]=[], moc
// DEVTEST: Echo a variety of path related info so we can see differences between local and CircleCI.
console.log(
`\nCurrent Working Dir: ${process.cwd()}` +
`\nFALCON_COMMAND_RUNNER: ${process.env.FALCON_COMMAND_RUNNER}` +
`\nCLI Command Runner: ${process.env.FALCON_COMMAND_RUNNER}` +
`\nIntended Working Dir: ${opts.workingDir}` +
`\nCommand to Execute: ${args.join(' ')}\n`
);
Expand Down
19 changes: 4 additions & 15 deletions test/helpers/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,10 @@ process.env.FALCON_TEST_SHOW_STDOUT = process.env.FALCON_TEST_SHOW_STDOUT || '';
process.env.FALCON_TEST_SHOW_STDERR = process.env.FALCON_TEST_SHOW_STDERR || ''; // stderr from spawned process is piped to the main process.
process.env.FALCON_TEST_SHOW_RESULT = process.env.FALCON_TEST_SHOW_RESULT || ''; // Prints internal commandResult object at the conclusion of executeWithInput().

// DEVTEST: Echo the various "debug" env vars.
console.log(`FALCON_TEST_SHOW_STDOUT: ${process.env.FALCON_TEST_SHOW_STDOUT}`);
console.log(`FALCON_TEST_SHOW_STDERR: ${process.env.FALCON_TEST_SHOW_STDERR}`);
console.log(`FALCON_TEST_SHOW_RESULT: ${process.env.FALCON_TEST_SHOW_RESULT}`);

// DEVTEST: Demonstrate how boolean checks of env vars goes.
if (process.env.FALCON_TEST_SHOW_STDOUT) {
console.log('-->FALCON_TEST_SHOW_STDOUT environment var deemed TRUE<--');
}
if (process.env.FALCON_TEST_SHOW_STDERR) {
console.log('-->FALCON_TEST_SHOW_STDERR environment var deemed TRUE<--');
}
if (process.env.FALCON_TEST_SHOW_RESULT) {
console.log('-->FALCON_TEST_SHOW_RESULT environment var deemed TRUE<--');
}
// Echo the TRUE/FALSE state of the "Falcon Test Show" family of environment vars.
console.log(`FALCON_TEST_SHOW_STDOUT: ${process.env.FALCON_TEST_SHOW_STDOUT ? 'TRUE' : 'FALSE'}`);
console.log(`FALCON_TEST_SHOW_STDERR: ${process.env.FALCON_TEST_SHOW_STDERR ? 'TRUE' : 'FALSE'}`);
console.log(`FALCON_TEST_SHOW_RESULT: ${process.env.FALCON_TEST_SHOW_RESULT ? 'TRUE' : 'FALSE'}`);

// Delete everything inside of the Falcon Test Temp Directory EXCEPT .gitignore
del.sync(
Expand Down
2 changes: 1 addition & 1 deletion test/integration-tests/commands/falcon/adk/install.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('falcon:adk:install', () => {
//───────────────────────────────────────────────────────────────────────────┐
// Test One
//───────────────────────────────────────────────────────────────────────────┘
it.skip('should successfully run the default Recipe inside project "adk-test-01"', async () => {
it('should successfully run the default Recipe inside project "adk-test-01"', async () => {
const commandResponse = await executeWithInput(
process.env.FALCON_COMMAND_RUNNER, // Path to the process that will be run.
[
Expand Down

0 comments on commit aa381e8

Please sign in to comment.