File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,11 +5,10 @@ var ConfigFileInfo = ClassicFileInfo.extend({
55
66
77 init : function ( options ) {
8+ this . _super ( options ) ;
89 options . type = 'config' ;
910 options . base = '.' ;
1011 options . sourceRoot = '.' ;
11-
12- this . _super ( options ) ;
1312 } ,
1413
1514 populateCollection : function ( ) {
Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ module.exports = {
6161 var testSubjectType ;
6262
6363 if ( testType === 'unit' || testType === 'integration' ) {
64+ options . base = 'src' ;
6465 options . testType = testType ;
6566
6667 topLevelDirectory = pathParts [ 2 ] ;
@@ -70,6 +71,10 @@ module.exports = {
7071 options . type = testSubjectType + '-' + testType + '-test' ;
7172
7273 return new TestFileInfo ( options ) ;
74+ } else if ( testType !== 'acceptance' ) {
75+ options . type = testType ;
76+ options . base = 'tests' ;
77+ return new ClassicFileInfo ( options ) ;
7378 }
7479 } else if ( sourceRoot === 'config' ) {
7580 return new ConfigFileInfo ( options ) ;
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ var FileInfo = CoreObject.extend({
2222 this . type = options . type ;
2323
2424 this . ext = options . ext ;
25- this . base = options . base ;
25+ this . base = options . base || 'src' ;
2626 this . name = options . name ;
2727 this . _bucket = options . bucket ;
2828 this . namespace = options . namespace ;
@@ -48,7 +48,7 @@ var FileInfo = CoreObject.extend({
4848
4949 populateBucket : function ( ) {
5050 this . bucket = path . join (
51- 'src' ,
51+ this . base ,
5252 this . collectionGroup ,
5353 this . collection ,
5454 this . namespace ,
@@ -195,7 +195,7 @@ var FileInfo = CoreObject.extend({
195195Object . defineProperty ( FileInfo . prototype , 'destRelativePath' , {
196196 get : function ( ) {
197197 var baseRelativePath = path . join (
198- 'src /',
198+ this . base + ' /',
199199 this . collectionGroup ,
200200 this . collection
201201 ) ;
Original file line number Diff line number Diff line change @@ -13,6 +13,10 @@ module.exports = {
1313 'environment.js' : '"ENV"'
1414 } ,
1515 tests : {
16+ 'helpers' : {
17+ 'resolver.js' : 'import config from "../../config/environment";' ,
18+ 'start-app.js' : 'import config from "my-app/config/environment";'
19+ } ,
1620 unit : {
1721 utils : {
1822 'first-test.js' : 'import config from "../../../config/environment";' ,
Original file line number Diff line number Diff line change @@ -20,5 +20,11 @@ module.exports = {
2020 } ,
2121 config : {
2222 'environment.js' : '"ENV"'
23+ } ,
24+ tests : {
25+ 'helpers' : {
26+ 'resolver.js' : 'import config from "../../config/environment";' ,
27+ 'start-app.js' : 'import config from "my-app/config/environment";'
28+ }
2329 }
2430} ;
Original file line number Diff line number Diff line change 1+ module . exports = {
2+ app : {
3+ 'app.js' : '// app' ,
4+ 'resolver.js' : '// resolver'
5+ } ,
6+ config : {
7+ 'environment.js' : '"ENV"'
8+ } ,
9+ tests : {
10+ helpers : {
11+ 'resolver.js' : 'import Resolver from "../../resolver";' ,
12+ 'start-app.js' : 'import App from "../../app";'
13+ }
14+ }
15+ } ;
Original file line number Diff line number Diff line change 1+ module . exports = {
2+ src : {
3+ 'main.js' : '// app' ,
4+ 'resolver.js' : '// resolver'
5+ } ,
6+ config : {
7+ 'environment.js' : '"ENV"'
8+ } ,
9+ tests : {
10+ 'helpers' : {
11+ 'resolver.js' : 'import Resolver from "../../src/resolver";' ,
12+ 'start-app.js' : 'import App from "../../src/main";'
13+ }
14+ }
15+ } ;
You can’t perform that action at this time.
0 commit comments