@@ -52,40 +52,34 @@ describe('The Angularity test task', function () {
5252 . addInvocation ( 'test' )
5353 . forEach ( slowIt ( expectations ) )
5454 . finally ( done ) ;
55-
56- function expectations ( testCase ) {
57- expect ( testCase . stdout ) . toBeTask ( 'test' ) ;
58- expect ( testCase . stdout ) . toMatch ( / I N F O \s \[ k a r m a \] / ) ; // TODO @bholloway choose a browser that will work on cloud CI
59- javascriptTask . expectations ( testCase ) ;
60-
61- // make replacements to allow karma.conf.js to be correctly diff'd
62- var workingTestFile = helper . getConcatenation ( testCase . cwd , TEST_FOLDER ) ;
63- var sourceTestFile = helper . getConcatenation ( testCase . sourceDir , TEST_FOLDER ) ;
64- var replace = helper . replacer ( )
65- . add ( / ^ ( \s * b a s e P a t h \: \s * [ ' " ] ) [ ^ ' " ] * ( [ ' " ] .* ) $ / gm, '$1%redacted%$2' ) // basePath should be redacted
66- . add ( / ^ ( \s * r e q u i r e \( [ ' " ] ) [ ^ ' " ] * ( [ ' " ] .* ) $ / gm, '$1%redacted%$2' ) // all require paths should be redacted
67- . add ( / \\ { 2 } / g, '/' )
68- . commit ( ) ;
69- expect ( replace ( workingTestFile ( 'karma.conf.js' ) ) ) . diffPatch ( replace ( sourceTestFile ( 'karma.conf.js' ) ) ) ;
70- }
7155 } ) ;
7256
73- describe ( 'should not support unminified option' , function ( done ) {
57+ describe ( 'should support unminified option, but not minify test output ' , function ( done ) {
7458 helper . runner . create ( )
7559 . addSource ( 'minimal-es5-unminified' )
7660 . addInvocation ( 'test --unminified' )
7761 . addInvocation ( 'test -u' )
7862 . forEach ( slowIt ( expectations ) )
7963 . finally ( done ) ;
80-
81- function expectations ( testCase ) {
82- if ( ! testCase . exitcode ) { // TODO @bholloway windows invocation fails in test but not in real use
83- expect ( testCase . stderr ) . toBeHelpWithError ( true ) ;
84- }
85- }
8664 } ) ;
8765} ) ;
8866
67+ function expectations ( testCase ) {
68+ expect ( testCase . stdout ) . toBeTask ( 'test' ) ;
69+ expect ( testCase . stdout ) . toMatch ( / I N F O \s \[ k a r m a \] / ) ; // TODO @bholloway choose a browser that will work on cloud CI
70+ javascriptTask . expectations ( testCase ) ;
71+
72+ // make replacements to allow karma.conf.js to be correctly diff'd
73+ var workingTestFile = helper . getConcatenation ( testCase . cwd , TEST_FOLDER ) ;
74+ var sourceTestFile = helper . getConcatenation ( testCase . sourceDir , TEST_FOLDER ) ;
75+ var replace = helper . replacer ( )
76+ . add ( / ^ ( \s * b a s e P a t h \: \s * [ ' " ] ) [ ^ ' " ] * ( [ ' " ] .* ) $ / gm, '$1%redacted%$2' ) // basePath should be redacted
77+ . add ( / ^ ( \s * r e q u i r e \( [ ' " ] ) [ ^ ' " ] * ( [ ' " ] .* ) $ / gm, '$1%redacted%$2' ) // all require paths should be redacted
78+ . add ( / \\ { 2 } / g, '/' )
79+ . commit ( ) ;
80+ expect ( replace ( workingTestFile ( 'karma.conf.js' ) ) ) . diffPatch ( replace ( sourceTestFile ( 'karma.conf.js' ) ) ) ;
81+ }
82+
8983function customMatchers ( ) {
9084 jasmine . addMatchers ( {
9185 toBeHelpWithError : matchers . getHelpMatcher ( / ^ \s * T h e " t e s t " t a s k / )
0 commit comments