Skip to content

Commit

Permalink
incorporate angular gen unit tests to integration tests (hyperledger-…
Browse files Browse the repository at this point in the history
…archives#4137)

Signed-off-by: Nick Lincoln <[email protected]>
  • Loading branch information
nklincoln authored and cazfletch committed Jun 11, 2018
1 parent 1ab6d30 commit 2f143b3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ Feature: Angular Application Generator
| ../my-angular-app/src/app/Trader/Trader.component.ts |
| ../my-angular-app/e2e/app.e2e-spec.ts |

Scenario: I can run the generated unit tests
When I run the following expected pass CLI command
"""
npm test --prefix ./my-angular-app
"""
Then The stdout information should include text matching /Executed 5 of 5 SUCCESS/

Scenario: I can start the generated application and test it with generated integration tests
When I spawn the following background task GENERATED_APP, and wait for /webpack: Compiled successfully./
"""
Expand Down
5 changes: 4 additions & 1 deletion packages/composer-tests-integration/lib/composer.js
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,8 @@ class Composer {
return new Promise((resolve, reject) => {

const options = {
env : env
env : env,
maxBuffer: 100000000
};
let childCliProcess = childProcess.exec(command, options);

Expand All @@ -481,11 +482,13 @@ class Composer {

childCliProcess.stdout.on('data', (data) => {
data = stripAnsi(data);
console.log('STDOUT', data);
stdout += data;
});

childCliProcess.stderr.on('data', (data) => {
data = stripAnsi(data);
console.log('STDERR', data);
stderr += data;
});

Expand Down

0 comments on commit 2f143b3

Please sign in to comment.