-
Notifications
You must be signed in to change notification settings - Fork 28
Added test + logic to shortcircuit test command #381
Conversation
Codecov Report
@@ Coverage Diff @@
## master #381 +/- ##
==========================================
+ Coverage 99.25% 99.25% +<.01%
==========================================
Files 71 71
Lines 1743 1750 +7
Branches 283 284 +1
==========================================
+ Hits 1730 1737 +7
Misses 13 13
Continue to review full report at Codecov.
|
test/cli-test.spec.js
Outdated
@@ -227,4 +227,16 @@ describe('cli test', () => { | |||
|
|||
expect(process.exit).toHaveBeenCalledWith(0); | |||
}); | |||
|
|||
it('should not continue if no e2e spec files exist', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean "no unit test spec"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. Correcting now...
cli/test.js
Outdated
@@ -46,6 +50,11 @@ function test(command, argv) { | |||
process.exit(exitCode); | |||
}; | |||
|
|||
if (specsGlob.length === 0) { | |||
logger.info('No spec files located. Stopping command from running.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd maybe change the wording to "No spec files located. Skipping test command."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied this text verbatim from what's displayed today in skyux e2e
. I'll update both to use your text, accounting for "test" vs "e2e" of course.
* Added test + logic to shortcircuit test command * Incorporated feedback
This should shave off a couple minutes of builds, mainly for Stache sites that contain to unit tests.