Skip to content

Commit 6c0d35e

Browse files
authored
fix the "--verbose" flag of bit test
1 parent e4836c9 commit 6c0d35e

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [unreleased]
99

10+
- fix the "--verbose" flag of `bit test`
1011
- add logger
1112
- support debug-mode for e2e tests
1213

src/api/consumer/lib/test-inline.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ import { loadConsumer } from '../../../consumer';
33
import InlineId from '../../../consumer/bit-inline-id';
44
import Bit from '../../../consumer/component';
55

6-
export function testInline(id: string): Promise<Bit> {
6+
export function testInline(id: string, verbose: boolean): Promise<Bit> {
77
return loadConsumer()
88
.then(consumer =>
9-
consumer.runComponentSpecs(InlineId.parse(id))
9+
consumer.runComponentSpecs(InlineId.parse(id), verbose)
1010
);
1111
}
1212

13-
export function testInlineAll(): Promise<Bit> {
13+
export function testInlineAll(verbose: boolean): Promise<Bit> {
1414
return loadConsumer()
1515
.then(consumer =>
16-
consumer.runAllInlineSpecs()
16+
consumer.runAllInlineSpecs(verbose)
1717
);
1818
}

src/cli/commands/public-cmds/test-cmd.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ export default class Test extends Command {
2222
verbose: ?bool,
2323
}): Promise<any> {
2424
function test() {
25-
if (!id) return testInlineAll();
26-
if (inline) return testInline(id);
25+
if (!id) return testInlineAll(verbose);
26+
if (inline) return testInline(id, verbose);
2727
return testInScope({ id, environment, save, verbose });
2828
}
2929

src/consumer/consumer.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,17 +241,17 @@ export default class Consumer {
241241
);
242242
}
243243

244-
runComponentSpecs(id: BitInlineId): Promise<?any> {
244+
runComponentSpecs(id: BitInlineId, verbose: boolean = false): Promise<?any> {
245245
return this.loadComponent(id)
246246
.then((component) => {
247-
return component.runSpecs({ scope: this.scope, consumer: this });
247+
return component.runSpecs({ scope: this.scope, consumer: this, verbose });
248248
});
249249
}
250250

251-
runAllInlineSpecs() {
251+
runAllInlineSpecs(verbose: boolean = false) {
252252
return this.listInline().then((components) => {
253253
return Promise.all(components.map(component => component
254-
.runSpecs({ scope: this.scope, consumer: this })
254+
.runSpecs({ scope: this.scope, consumer: this, verbose })
255255
.then((result) => { return { specs: result, component }; })));
256256
});
257257
}

0 commit comments

Comments
 (0)