Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit 5623129

Browse files
vsavkinchirayuk
authored andcommitted
chore(travis): fail build if a test has been 'iit'ed
Change the build script to fail if a test was 'itt'ed or 'ddescribe'ed. Closes #922 Closes #1172
1 parent 559a685 commit 5623129

File tree

4 files changed

+31
-3
lines changed

4 files changed

+31
-3
lines changed

pubspec.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ packages:
3838
guinness:
3939
description: guinness
4040
source: hosted
41-
version: "0.1.13"
41+
version: "0.1.9"
4242
html5lib:
4343
description: html5lib
4444
source: hosted

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dependencies:
2727
web_components: '>=0.3.3 <0.4.0'
2828
dev_dependencies:
2929
benchmark_harness: '>=1.0.0 <2.0.0'
30-
guinness: '>=0.1.13 <0.2.0'
30+
guinness: '>=0.1.9 <0.2.0'
3131
mock: '>=0.10.0 <0.12.0'
3232
protractor: '0.0.5'
3333
unittest: '>=0.10.1 <0.12.0'

scripts/travis/build.sh

+12-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,18 @@ echo BROWSER=$BROWSERS
111111
$NGDART_BASE_DIR/node_modules/jasmine-node/bin/jasmine-node playback_middleware/spec/ &&
112112
node "node_modules/karma/bin/karma" start karma.conf \
113113
--reporters=junit,dots --port=8765 --runner-port=8766 \
114-
--browsers=$BROWSERS --single-run --no-colors
114+
--browsers=$BROWSERS --single-run --no-colors 2>&1 | tee karma-output.log
115+
116+
if grep -q "WARN: iit" karma-output.log; then
117+
echo "ERROR: iit caused some tests to be excluded"
118+
exit 1
119+
fi
120+
121+
if grep -q "WARN: ddescribe" karma-output.log; then
122+
echo "ERROR: ddescribe caused some tests to be excluded"
123+
exit 1
124+
fi
125+
115126

116127

117128
echo '-------------------------'

test/config/init_guinness.dart

+17
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,22 @@ import 'package:unittest/unittest.dart' as unit;
44
main() {
55
unit.filterStacks = true;
66
unit.formatStacks = false;
7+
8+
_printWarnings();
9+
10+
guinness.autoInit = false;
711
guinness.initSpecs();
812
}
13+
14+
_printWarnings () {
15+
final info = guinness.suiteInfo();
16+
17+
if (info.activeIts.any((it) => it.exclusive)) {
18+
print("WARN: iit caused some tests to be excluded");
19+
}
20+
21+
if (info.exclusiveDescribes.isNotEmpty) {
22+
print("WARN: ddescribe caused some tests to be excluded");
23+
}
24+
}
25+

0 commit comments

Comments
 (0)