-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
145c50f
commit ade8faa
Showing
7 changed files
with
361 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
(function() { | ||
'use strict'; | ||
|
||
var common = require("../common"); | ||
var options = common.options; | ||
var assert = common.assert; | ||
var testingUtil = common.testingUtil; | ||
var mockGulpDest = common.mockGulpDest; | ||
var gulp = common.gulp; | ||
var util = common.util; | ||
|
||
function beforeEach() { | ||
testingUtil.mockPrompt({ | ||
module: 'module1', | ||
fileName: 'strangefilename', | ||
test: true | ||
}); | ||
util.setRuntimeMode('LIVE'); | ||
} | ||
|
||
it('test for error constant', function(done) { | ||
beforeEach(); | ||
assert.that(function() { | ||
done(); | ||
gulp.start('constant', ['test']); | ||
}).is.throwing(); | ||
}); | ||
it('test for error controller', function(done) { | ||
beforeEach(); | ||
assert.that(function() { | ||
done(); | ||
gulp.start('controller'); | ||
}).is.throwing(); | ||
}); | ||
it('test for error service', function(done) { | ||
beforeEach(); | ||
assert.that(function() { | ||
done(); | ||
gulp.start('service'); | ||
}).is.throwing(); | ||
}); | ||
it('test for error decorator', function(done) { | ||
beforeEach(); | ||
assert.that(function() { | ||
done(); | ||
gulp.start('decorator'); | ||
}).is.throwing(); | ||
}); | ||
it('test for error directive', function(done) { | ||
beforeEach(); | ||
assert.that(function() { | ||
done(); | ||
gulp.start('directive'); | ||
}).is.throwing(); | ||
}); | ||
it('test for error factory', function(done) { | ||
beforeEach(); | ||
assert.that(function() { | ||
done(); | ||
gulp.start('factory'); | ||
}).is.throwing(); | ||
}); | ||
it('test for error filter', function(done) { | ||
beforeEach(); | ||
assert.that(function() { | ||
done(); | ||
gulp.start('filter'); | ||
}).is.throwing(); | ||
}); | ||
it('test for error provider', function(done) { | ||
beforeEach(); | ||
assert.that(function() { | ||
done(); | ||
gulp.start('provider'); | ||
}).is.throwing(); | ||
}); | ||
it('test for error route', function(done) { | ||
beforeEach(); | ||
assert.that(function() { | ||
done(); | ||
gulp.start('route'); | ||
}).is.throwing(); | ||
}); | ||
it('test for error value', function(done) { | ||
beforeEach(); | ||
assert.that(function() { | ||
done(); | ||
gulp.start('value'); | ||
}).is.throwing(); | ||
}); | ||
it('test for error view', function(done) { | ||
beforeEach(); | ||
assert.that(function() { | ||
done(); | ||
gulp.start('view'); | ||
}).is.throwing(); | ||
}); | ||
|
||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
(function() { | ||
'use strict'; | ||
|
||
var common = require("../common"); | ||
var options = common.options; | ||
var assert = common.assert; | ||
var testingUtil = common.testingUtil; | ||
var mockGulpDest = common.mockGulpDest; | ||
var gulp = common.gulp; | ||
var util = common.util; | ||
|
||
function beforeEach() { | ||
process.chdir(__dirname); | ||
testingUtil.mockPrompt({ | ||
module: 'module1', | ||
fileName: 'myprovider' | ||
}); | ||
util.setRuntimeMode('TEST'); | ||
} | ||
|
||
it('should put the provider file in the correct directory', function(done) { | ||
beforeEach(); | ||
gulp.start('provider').once('stop', function() { | ||
assert.that(mockGulpDest.basePath()).is.endingWith('src/app/components/module1'); | ||
done(); | ||
}); | ||
}); | ||
it('should put the correct provider filename', function(done) { | ||
beforeEach(); | ||
gulp.start('provider').once('stop', function() { | ||
mockGulpDest.assertDestContains('myprovider-provider.js'); | ||
done(); | ||
}); | ||
}); | ||
|
||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
(function() { | ||
'use strict'; | ||
|
||
var common = require("../common"); | ||
var options = common.options; | ||
var assert = common.assert; | ||
var testingUtil = common.testingUtil; | ||
var mockGulpDest = common.mockGulpDest; | ||
var gulp = common.gulp; | ||
var util = common.util; | ||
|
||
function beforeEach() { | ||
process.chdir(__dirname); | ||
testingUtil.mockPrompt({ | ||
module: 'module1', | ||
fileName: 'myservice' | ||
}); | ||
util.setRuntimeMode('TEST'); | ||
} | ||
|
||
it('should put the service file in the correct directory', function(done) { | ||
beforeEach(); | ||
gulp.start('service').once('stop', function() { | ||
assert.that(mockGulpDest.basePath()).is.endingWith('src/app/components/module1'); | ||
done(); | ||
}); | ||
}); | ||
it('should put the correct service filename', function(done) { | ||
beforeEach(); | ||
gulp.start('service').once('stop', function() { | ||
mockGulpDest.assertDestContains('myservice-service.js'); | ||
done(); | ||
}); | ||
}); | ||
|
||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
(function() { | ||
'use strict'; | ||
|
||
var common = require("../common"); | ||
var options = common.options; | ||
var assert = common.assert; | ||
var testingUtil = common.testingUtil; | ||
var mockGulpDest = common.mockGulpDest; | ||
var gulp = common.gulp; | ||
var util = common.util; | ||
|
||
function beforeEach() { | ||
process.chdir(__dirname); | ||
testingUtil.mockPrompt({ | ||
module: 'module1', | ||
fileName: 'myvalue' | ||
}); | ||
util.setRuntimeMode('TEST'); | ||
} | ||
|
||
it('should put the value file in the correct directory', function(done) { | ||
beforeEach(); | ||
gulp.start('value').once('stop', function() { | ||
assert.that(mockGulpDest.basePath()).is.endingWith('src/app/components/module1'); | ||
done(); | ||
}); | ||
}); | ||
it('should put the correct value filename', function(done) { | ||
beforeEach(); | ||
gulp.start('value').once('stop', function() { | ||
mockGulpDest.assertDestContains('myvalue-value.js'); | ||
done(); | ||
}); | ||
}); | ||
|
||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
(function() { | ||
'use strict'; | ||
|
||
var common = require("../common"); | ||
var options = common.options; | ||
var assert = common.assert; | ||
var testingUtil = common.testingUtil; | ||
var mockGulpDest = common.mockGulpDest; | ||
var gulp = common.gulp; | ||
var util = common.util; | ||
|
||
function beforeEach() { | ||
process.chdir(__dirname); | ||
testingUtil.mockPrompt({ | ||
module: 'module1', | ||
fileName: 'myview' | ||
}); | ||
util.setRuntimeMode('TEST'); | ||
} | ||
|
||
it('should put the view file in the correct directory', function(done) { | ||
beforeEach(); | ||
gulp.start('view').once('stop', function() { | ||
assert.that(mockGulpDest.basePath()).is.endingWith('src/app/components/module1'); | ||
done(); | ||
}); | ||
}); | ||
it('should put the correct view filename', function(done) { | ||
beforeEach(); | ||
gulp.start('view').once('stop', function() { | ||
mockGulpDest.assertDestContains('myview-view.html'); | ||
done(); | ||
}); | ||
}); | ||
|
||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters