Skip to content

Commit

Permalink
In order to speed up development of writing and running tests adding …
Browse files Browse the repository at this point in the history
…the `skip-build` option to the lamington command to skip the unnecessary step of building the contracts and type definitions on each running of the tests.
  • Loading branch information
dallasjohnson committed Oct 7, 2019
1 parent 24e9d97 commit 875a50b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ program
.command('build [contract_path]', 'build all smart contracts')
.command('start', 'start the eos blockchain in docker')
.command('stop', 'stop the eos blockchain in docker')
.command('test', 'run your unit / integration tests')
.command('test [skip-build]', 'run your unit / integration tests')
.on('*', () => {
console.log('Unknown Command: ' + program.args.join(' '));
program.help();
Expand Down
5 changes: 5 additions & 0 deletions src/cli/lamington-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import { ConfigManager } from '../configManager';
const run = async () => {
// Initialize the configuration
await ConfigManager.initWithDefaults();
const args = process.argv;

console.log('args: ' + args);

// Stop running instances for fresh test environment
if (await eosIsReady()) {
Expand All @@ -22,7 +25,9 @@ const run = async () => {
await startEos();
}
// Start compiling smart contracts
if (!args.includes('skip-build')) {
await buildAll();
}
// Begin running tests
await runTests();
// Stop EOSIO instance if keepAlive is false
Expand Down

0 comments on commit 875a50b

Please sign in to comment.