-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue #82 add for module group according to helix spec.
- Loading branch information
Showing
3 changed files
with
95 additions
and
8 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,69 @@ | ||
/*global describe, it*/ | ||
'use strict'; | ||
|
||
var path = require('path'); | ||
var helpers = require('yeoman-test'); | ||
var assert = require('yeoman-assert'); | ||
|
||
describe('yo helix:add modulegroup', function () { | ||
|
||
it('Can add on a emptyhelix solution with modulegroup', function checkFiles (done) { | ||
helpers.run(path.join(__dirname, '../generators/add')) | ||
.inTmpDir(function () { | ||
var doneParent = this.async(); // `this` is the RunContext object. | ||
helpers.run(path.join(__dirname, '../generators/app')) | ||
.withPrompts({ | ||
SolutionType: 'emptyhelix', | ||
SolutionName: 'UnitTest', | ||
target: 'v4.6.1' | ||
}).then(() => { | ||
doneParent(); | ||
}); | ||
}) | ||
.withPrompts({ | ||
ProjectName: 'AddedProjectFeatureName', | ||
VendorPrefix: 'Acme', | ||
layer: 'Feature', | ||
modulegroup: 'Login' | ||
}).then(() => { | ||
|
||
assert.file([ | ||
'./src/Feature/Login/AddedProjectFeatureName/code/Acme.Feature.AddedProjectFeatureName.csproj' | ||
]); | ||
|
||
done(); | ||
}); | ||
|
||
}); | ||
|
||
it('Can add on a pentia solution with empty modulegroup', function checkFiles (done) { | ||
// This test might seem unnecessary. But when you run the code normally an empty value from the prompt is an empty string, | ||
// but in a test context it's 'undefined' | ||
helpers.run(path.join(__dirname, '../generators/add')) | ||
.inTmpDir(function () { | ||
var doneParent = this.async(); // `this` is the RunContext object. | ||
helpers.run(path.join(__dirname, '../generators/app')) | ||
.withPrompts({ | ||
SolutionType: 'pentiahelix', | ||
SolutionName: 'UnitTest', | ||
target: 'v4.6.1' | ||
}).then(() => { | ||
doneParent(); | ||
}); | ||
}) | ||
.withPrompts({ | ||
ProjectName: 'AddedProjectFeatureName', | ||
VendorPrefix: '', | ||
layer: 'Feature', | ||
modulegroup: 'Login' | ||
}).then(() => { | ||
|
||
assert.file([ | ||
'./src/Feature/Login/AddedProjectFeatureName/code/Feature.AddedProjectFeatureName.csproj' | ||
]); | ||
|
||
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 |
---|---|---|
|
@@ -125,6 +125,5 @@ describe('yo helix:add', function () { | |
|
||
done(); | ||
}); | ||
|
||
}); | ||
}); |