@@ -30,29 +30,29 @@ describe('Acceptance: ng generate directive', function () {
30
30
return tmp . teardown ( './tmp' ) ;
31
31
} ) ;
32
32
33
- it ( 'ng generate directive my-comp ' , function ( ) {
34
- return ng ( [ 'generate' , 'directive' , 'my-comp ' ] ) . then ( ( ) => {
35
- var testPath = path . join ( root , 'tmp' , 'foo' , 'src' , 'app' , 'my-comp ' , 'my-comp .ts' ) ;
33
+ it ( 'ng generate directive my-dir ' , function ( ) {
34
+ return ng ( [ 'generate' , 'directive' , 'my-dir ' ] ) . then ( ( ) => {
35
+ var testPath = path . join ( root , 'tmp' , 'foo' , 'src' , 'client' , ' app', 'my-dir ' , 'my-dir .ts' ) ;
36
36
expect ( existsSync ( testPath ) ) . to . equal ( true ) ;
37
37
} ) ;
38
38
} ) ;
39
39
40
- it ( 'ng generate directive test' + path . sep + 'my-comp ' , function ( ) {
41
- return ng ( [ 'generate' , 'directive' , 'test' + path . sep + 'my-comp ' ] ) . then ( ( ) => {
42
- var testPath = path . join ( root , 'tmp' , 'foo' , 'src' , 'app' , 'test' , 'my-comp ' , 'my-comp .ts' ) ;
40
+ it ( 'ng generate directive test' + path . sep + 'my-dir ' , function ( ) {
41
+ return ng ( [ 'generate' , 'directive' , 'test' + path . sep + 'my-dir ' ] ) . then ( ( ) => {
42
+ var testPath = path . join ( root , 'tmp' , 'foo' , 'src' , 'client' , ' app', 'test' , 'my-dir ' , 'my-dir .ts' ) ;
43
43
expect ( existsSync ( testPath ) ) . to . equal ( true ) ;
44
44
} ) ;
45
45
} ) ;
46
46
47
- it ( 'ng generate directive test' + path . sep + '..' + path . sep + 'my-comp ' , function ( ) {
48
- return ng ( [ 'generate' , 'directive' , 'test' + path . sep + '..' + path . sep + 'my-comp ' ] )
47
+ it ( 'ng generate directive test' + path . sep + '..' + path . sep + 'my-dir ' , function ( ) {
48
+ return ng ( [ 'generate' , 'directive' , 'test' + path . sep + '..' + path . sep + 'my-dir ' ] )
49
49
. then ( ( ) => {
50
- var testPath = path . join ( root , 'tmp' , 'foo' , 'src' , 'app' , 'my-comp ' , 'my-comp .ts' ) ;
50
+ var testPath = path . join ( root , 'tmp' , 'foo' , 'src' , 'client' , ' app', 'my-dir ' , 'my-dir .ts' ) ;
51
51
expect ( existsSync ( testPath ) ) . to . equal ( true ) ;
52
52
} ) ;
53
53
} ) ;
54
54
55
- it ( 'ng generate directive my-comp from a child dir' , ( ) => {
55
+ it ( 'ng generate directive my-dir from a child dir' , ( ) => {
56
56
return new Promise ( function ( resolve ) {
57
57
process . chdir ( './src' ) ;
58
58
resolve ( ) ;
@@ -62,15 +62,15 @@ describe('Acceptance: ng generate directive', function () {
62
62
. then ( ( ) => process . chdir ( './1' ) )
63
63
. then ( ( ) => {
64
64
process . env . CWD = process . cwd ( ) ;
65
- return ng ( [ 'generate' , 'directive' , 'my-comp ' ] )
65
+ return ng ( [ 'generate' , 'directive' , 'my-dir ' ] )
66
66
} )
67
67
. then ( ( ) => {
68
- var testPath = path . join ( root , 'tmp' , 'foo' , 'src' , 'app' , '1' , 'my-comp ' , 'my-comp .ts' ) ;
68
+ var testPath = path . join ( root , 'tmp' , 'foo' , 'src' , 'client' , ' app', '1' , 'my-dir ' , 'my-dir .ts' ) ;
69
69
expect ( existsSync ( testPath ) ) . to . equal ( true ) ;
70
70
} , err => console . log ( 'ERR: ' , err ) ) ;
71
71
} ) ;
72
72
73
- it ( 'ng generate directive child-dir' + path . sep + 'my-comp from a child dir' , ( ) => {
73
+ it ( 'ng generate directive child-dir' + path . sep + 'my-dir from a child dir' , ( ) => {
74
74
return new Promise ( function ( resolve ) {
75
75
process . chdir ( './src' ) ;
76
76
resolve ( ) ;
@@ -80,16 +80,16 @@ describe('Acceptance: ng generate directive', function () {
80
80
. then ( ( ) => process . chdir ( './1' ) )
81
81
. then ( ( ) => {
82
82
process . env . CWD = process . cwd ( ) ;
83
- return ng ( [ 'generate' , 'directive' , 'child-dir' + path . sep + 'my-comp ' ] )
83
+ return ng ( [ 'generate' , 'directive' , 'child-dir' + path . sep + 'my-dir ' ] )
84
84
} )
85
85
. then ( ( ) => {
86
86
var testPath = path . join (
87
- root , 'tmp' , 'foo' , 'src' , 'app' , '1' , 'child-dir' , 'my-comp ' , 'my-comp .ts' ) ;
87
+ root , 'tmp' , 'foo' , 'src' , 'client' , ' app', '1' , 'child-dir' , 'my-dir ' , 'my-dir .ts' ) ;
88
88
expect ( existsSync ( testPath ) ) . to . equal ( true ) ;
89
89
} , err => console . log ( 'ERR: ' , err ) ) ;
90
90
} ) ;
91
91
92
- it ( 'ng generate directive child-dir' + path . sep + '..' + path . sep + 'my-comp from a child dir' ,
92
+ it ( 'ng generate directive child-dir' + path . sep + '..' + path . sep + 'my-dir from a child dir' ,
93
93
( ) => {
94
94
return new Promise ( function ( resolve ) {
95
95
process . chdir ( './src' ) ;
@@ -101,17 +101,17 @@ describe('Acceptance: ng generate directive', function () {
101
101
. then ( ( ) => {
102
102
process . env . CWD = process . cwd ( ) ;
103
103
return ng (
104
- [ 'generate' , 'directive' , 'child-dir' + path . sep + '..' + path . sep + 'my-comp ' ] )
104
+ [ 'generate' , 'directive' , 'child-dir' + path . sep + '..' + path . sep + 'my-dir ' ] )
105
105
} )
106
106
. then ( ( ) => {
107
107
var testPath =
108
- path . join ( root , 'tmp' , 'foo' , 'src' , 'app' , '1' , 'my-comp ' , 'my-comp .ts' ) ;
108
+ path . join ( root , 'tmp' , 'foo' , 'src' , 'client' , ' app', '1' , 'my-dir ' , 'my-dir .ts' ) ;
109
109
expect ( existsSync ( testPath ) ) . to . equal ( true ) ;
110
110
} , err => console . log ( 'ERR: ' , err ) ) ;
111
111
} ) ;
112
112
113
- it ( 'ng generate directive ' + path . sep + 'my-comp from a child dir, gens under ' +
114
- path . join ( 'src' , 'app' ) ,
113
+ it ( 'ng generate directive ' + path . sep + 'my-dir from a child dir, gens under ' +
114
+ path . join ( 'src' , 'client' , ' app') ,
115
115
( ) => {
116
116
return new Promise ( function ( resolve ) {
117
117
process . chdir ( './src' ) ;
@@ -122,17 +122,17 @@ describe('Acceptance: ng generate directive', function () {
122
122
. then ( ( ) => process . chdir ( './1' ) )
123
123
. then ( ( ) => {
124
124
process . env . CWD = process . cwd ( ) ;
125
- return ng ( [ 'generate' , 'directive' , path . sep + 'my-comp ' ] )
125
+ return ng ( [ 'generate' , 'directive' , path . sep + 'my-dir ' ] )
126
126
} )
127
127
. then ( ( ) => {
128
- var testPath = path . join ( root , 'tmp' , 'foo' , 'src' , 'app' , 'my-comp ' , 'my-comp .ts' ) ;
128
+ var testPath = path . join ( root , 'tmp' , 'foo' , 'src' , 'client' , ' app', 'my-dir ' , 'my-dir .ts' ) ;
129
129
expect ( existsSync ( testPath ) ) . to . equal ( true ) ;
130
130
} , err => console . log ( 'ERR: ' , err ) ) ;
131
131
} ) ;
132
132
133
- it ( 'ng generate directive ..' + path . sep + 'my-comp from root dir will fail' , ( ) => {
134
- return ng ( [ 'generate' , 'directive' , '..' + path . sep + 'my-comp ' ] ) . then ( ( ) => {
135
- var testPath = path . join ( root , 'tmp' , 'foo' , 'src' , 'app' , '..' , 'my-comp ' , 'my-comp .ts' ) ;
133
+ it ( 'ng generate directive ..' + path . sep + 'my-dir from root dir will fail' , ( ) => {
134
+ return ng ( [ 'generate' , 'directive' , '..' + path . sep + 'my-dir ' ] ) . then ( ( ) => {
135
+ var testPath = path . join ( root , 'tmp' , 'foo' , 'src' , 'client' , ' app', '..' , 'my-dir ' , 'my-dir .ts' ) ;
136
136
expect ( existsSync ( testPath ) ) . to . equal ( false ) ;
137
137
} ) ;
138
138
} ) ;
0 commit comments