@@ -14,7 +14,6 @@ var https = require('https');
14
14
var SilentError = require ( 'silent-error' ) ;
15
15
16
16
const expect = chai . expect ;
17
- const fsReadFile = Promise . denodeify ( fs . readFile ) ;
18
17
const fsWriteFile = Promise . denodeify ( fs . writeFile ) ;
19
18
const fsMkdir = Promise . denodeify ( fs . mkdir ) ;
20
19
@@ -67,7 +66,7 @@ describe('Acceptance: ng github-pages:deploy', function() {
67
66
} ) ;
68
67
} ) ;
69
68
70
- it ( 'should deploy with defaults to existing remote' , function ( ) {
69
+ it ( 'should deploy with defaults to existing remote' , function ( ) {
71
70
execStub . addExecSuccess ( 'git status --porcelain' )
72
71
. addExecSuccess ( 'git rev-parse --abbrev-ref HEAD' , initialBranch )
73
72
. addExecSuccess ( 'git remote -v' , remote )
@@ -78,12 +77,7 @@ describe('Acceptance: ng github-pages:deploy', function() {
78
77
. addExecSuccess ( `git push origin ${ ghPagesBranch } :${ ghPagesBranch } ` )
79
78
. addExecSuccess ( 'git remote -v' , remote ) ;
80
79
81
- return ng ( [ 'github-pages:deploy' , '--skip-build' ] )
82
- . then ( ( ) => {
83
- let indexHtml = path . join ( process . cwd ( ) , 'index.html' ) ;
84
- return fsReadFile ( indexHtml , 'utf8' ) ;
85
- } )
86
- . then ( ( data ) => expect ( data . search ( `<base href="/${ project } /">` ) ) . to . not . equal ( - 1 ) ) ;
80
+ return ng ( [ 'github-pages:deploy' , '--skip-build' ] ) ;
87
81
} ) ;
88
82
89
83
it ( 'should deploy with changed defaults' , function ( ) {
@@ -100,13 +94,7 @@ describe('Acceptance: ng github-pages:deploy', function() {
100
94
. addExecSuccess ( `git push origin ${ ghPagesBranch } :${ userPageBranch } ` )
101
95
. addExecSuccess ( 'git remote -v' , remote ) ;
102
96
103
- return ng ( [ 'github-pages:deploy' , '--skip-build' , `--message=${ message } ` ,
104
- '--user-page' ] )
105
- . then ( ( ) => {
106
- let indexHtml = path . join ( process . cwd ( ) , 'index.html' ) ;
107
- return fsReadFile ( indexHtml , 'utf8' ) ;
108
- } )
109
- . then ( ( data ) => expect ( data . search ( '<base href="/">' ) ) . to . not . equal ( - 1 ) ) ;
97
+ return ng ( [ 'github-pages:deploy' , '--skip-build' , `--message=${ message } ` , '--user-page' ] ) ;
110
98
} ) ;
111
99
112
100
it ( 'should create branch if needed' , function ( ) {
@@ -125,12 +113,7 @@ describe('Acceptance: ng github-pages:deploy', function() {
125
113
. addExecSuccess ( `git push origin ${ ghPagesBranch } :${ ghPagesBranch } ` )
126
114
. addExecSuccess ( 'git remote -v' , remote ) ;
127
115
128
- return ng ( [ 'github-pages:deploy' , '--skip-build' ] )
129
- . then ( ( ) => {
130
- let indexHtml = path . join ( process . cwd ( ) , 'index.html' ) ;
131
- return fsReadFile ( indexHtml , 'utf8' ) ;
132
- } )
133
- . then ( ( data ) => expect ( data . search ( `<base href="/${ project } /">` ) ) . to . not . equal ( - 1 ) ) ;
116
+ return ng ( [ 'github-pages:deploy' , '--skip-build' ] ) ;
134
117
} ) ;
135
118
136
119
it ( 'should create repo if needed' , function ( ) {
@@ -183,11 +166,6 @@ describe('Acceptance: ng github-pages:deploy', function() {
183
166
184
167
return ng ( [ 'github-pages:deploy' , '--skip-build' , `--gh-token=${ token } ` ,
185
168
`--gh-username=${ username } ` ] )
186
- . then ( ( ) => {
187
- let indexHtml = path . join ( process . cwd ( ) , 'index.html' ) ;
188
- return fsReadFile ( indexHtml , 'utf8' ) ;
189
- } )
190
- . then ( ( data ) => expect ( data . search ( `<base href="/${ project } /">` ) ) . to . not . equal ( - 1 ) )
191
169
. then ( ( ) => httpsStub . restore ( ) ) ;
192
170
} ) ;
193
171
0 commit comments