File tree Expand file tree Collapse file tree 4 files changed +18
-6
lines changed
minimal-es5-unminified/app-test Expand file tree Collapse file tree 4 files changed +18
-6
lines changed Original file line number Diff line number Diff line change 77module . exports = function ( config ) {
88 config . set ( {
99 // base path, that will be used to resolve files and exclude
10- basePath : '/Users/benholloway/Documents/WebstormProjects/angularity/node-angularity/test/expected/minimal-es5-unminified ' ,
10+ basePath : '/Users/benholloway/Documents/WebstormProjects/angularity/node-angularity/test/expected/minimal-es5' ,
1111
1212 //make sure we use karma-jasmine as the test framework
1313 frameworks : [ 'jasmine' ] ,
@@ -41,12 +41,14 @@ module.exports = function(config) {
4141 // installation and thus need to be registered manually
4242 // append to existing value to preserve plugins loaded automatically
4343 plugins : [ ] . concat ( config . plugins ) . concat ( [
44-
44+ require ( "/Users/benholloway/Documents/WebstormProjects/angularity/node-angularity/node_modules/karma-angularity-reporter" )
4545] ) ,
4646
4747 // use dots reporter, as travis terminal does not support escaping sequences
4848 // possible values: 'dots', 'progress', 'junit', 'teamcity'
49- reporters : [ ] . concat ( [ ] ) ,
49+ reporters : [ ] . concat ( [
50+ 'angularity'
51+ ] ) ,
5052
5153 // web server port
5254 port : 61680 ,
Original file line number Diff line number Diff line change @@ -41,12 +41,14 @@ module.exports = function(config) {
4141 // installation and thus need to be registered manually
4242 // append to existing value to preserve plugins loaded automatically
4343 plugins : [ ] . concat ( config . plugins ) . concat ( [
44-
44+ require ( "/Users/benholloway/Documents/WebstormProjects/angularity/node-angularity/node_modules/karma-angularity-reporter" )
4545] ) ,
4646
4747 // use dots reporter, as travis terminal does not support escaping sequences
4848 // possible values: 'dots', 'progress', 'junit', 'teamcity'
49- reporters : [ ] . concat ( [ ] ) ,
49+ reporters : [ ] . concat ( [
50+ 'angularity'
51+ ] ) ,
5052
5153 // web server port
5254 port : 61680 ,
Original file line number Diff line number Diff line change @@ -74,7 +74,11 @@ function expectations(testCase) {
7474 var sourceTestFile = helper . getConcatenation ( testCase . sourceDir , TEST_FOLDER ) ;
7575
7676 // general
77+ if ( / t e s t / . test ( testCase . command ) ) { // TODO @bholloway test should inherit JS not build
78+ expect ( testCase . stdout ) . toBeTask ( 'javascript' ) ;
79+ } else {
7780 expect ( testCase . stdout ) . toBeTask ( [ 'build' , 'javascript' , 'css' ] ) ;
81+ }
7882 expect ( testCase . cwd ) . toHaveExpectedItemsExcept ( ) ;
7983
8084 // build output
@@ -87,11 +91,14 @@ function expectations(testCase) {
8791 // must remove basePath to allow karma.conf.js to be correctly diff'd
8892 var replace = helper . replacer ( )
8993 . add ( / ^ \s * b a s e P a t h : .* $ / gm, '' )
94+ . add ( / ^ \s * r e q u i r e \( .* $ / gm, '' )
9095 . add ( / \\ { 2 } / g, '/' )
9196 . commit ( ) ;
9297
9398 // test output
94- expect ( replace ( workingTestFile ( 'karma.conf.js' ) ) ) . diffPatch ( replace ( sourceTestFile ( 'karma.conf.js' ) ) ) ;
99+ if ( / t e s t / . test ( testCase . command ) ) {
100+ expect ( replace ( workingTestFile ( 'karma.conf.js' ) ) ) . diffPatch ( replace ( sourceTestFile ( 'karma.conf.js' ) ) ) ; // TODO @bholloway reporter differs between build and test tasks
101+ }
95102 expect ( workingTestFile ( 'index.js' ) ) . diffFilePatch ( sourceTestFile ( 'index.js' ) ) ;
96103// expect(workingTestFile('index.js.map')).diffFilePatch(sourceTestFile('index.js.map')); // TODO @bholloway solve repeatability of .map files
97104}
Original file line number Diff line number Diff line change @@ -63,5 +63,6 @@ describe('The Angularity test task', function () {
6363
6464function expectations ( testCase ) {
6565 expect ( testCase . stdout ) . toBeTask ( 'test' ) ;
66+ expect ( testCase . stdout ) . toMatch ( / ^ K a r m a t e s t s \: \s + 1 \/ 1 $ / m) ;
6667 buildSpec . expectations ( testCase ) ;
6768}
You can’t perform that action at this time.
0 commit comments