-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3891 from marcioj/issue-3886
Fixes problem in initializer tests generated in addons
- Loading branch information
Showing
13 changed files
with
56 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default, <%= camelizedModuleName %> } from '<%= modulePath %>'; |
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,3 @@ | ||
/*jshint node:true*/ | ||
|
||
module.exports = require('../addon-import'); |
2 changes: 1 addition & 1 deletion
2
blueprints/helper-test/files/tests/unit/helpers/__name__-test.js
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 |
---|---|---|
@@ -1,5 +1,12 @@ | ||
/*jshint node:true*/ | ||
|
||
var getDependencyDepth = require('../../lib/utilities/get-dependency-depth'); | ||
|
||
module.exports = { | ||
description: 'Generates a helper unit test.' | ||
description: 'Generates a helper unit test.', | ||
locals: function(options) { | ||
return { | ||
dependencyDepth: getDependencyDepth(options) | ||
} | ||
} | ||
}; |
1 change: 1 addition & 0 deletions
1
blueprints/initializer-addon/files/__root__/__path__/__name__.js
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 @@ | ||
export { default, initialize } from '<%= modulePath %>'; |
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,3 @@ | ||
/*jshint node:true*/ | ||
|
||
module.exports = require('../addon-import'); |
2 changes: 1 addition & 1 deletion
2
blueprints/initializer-test/files/tests/unit/initializers/__name__-test.js
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 |
---|---|---|
@@ -1,5 +1,12 @@ | ||
/*jshint node:true*/ | ||
|
||
var getDependencyDepth = require('../../lib/utilities/get-dependency-depth'); | ||
|
||
module.exports = { | ||
description: 'Generates an initializer unit test.' | ||
description: 'Generates an initializer unit test.', | ||
locals: function(options) { | ||
return { | ||
dependencyDepth: getDependencyDepth(options) | ||
} | ||
} | ||
}; |
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,11 @@ | ||
'use strict'; | ||
|
||
module.exports = function getDependencyDepth(options) { | ||
var name = options.entity.name; | ||
var nameParts = name.split('/'); | ||
var depth = '../..'; | ||
|
||
return nameParts.reduce(function(prev) { | ||
return prev + '/..'; | ||
}, depth); | ||
}; |
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
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