@@ -14,7 +14,6 @@ var https = require('https');
1414var SilentError = require ( 'silent-error' ) ;
1515
1616const expect = chai . expect ;
17- const fsReadFile = Promise . denodeify ( fs . readFile ) ;
1817const fsWriteFile = Promise . denodeify ( fs . writeFile ) ;
1918const fsMkdir = Promise . denodeify ( fs . mkdir ) ;
2019
@@ -67,7 +66,7 @@ describe('Acceptance: ng github-pages:deploy', function() {
6766 } ) ;
6867 } ) ;
6968
70- it ( 'should deploy with defaults to existing remote' , function ( ) {
69+ it ( 'should deploy with defaults to existing remote' , function ( ) {
7170 execStub . addExecSuccess ( 'git status --porcelain' )
7271 . addExecSuccess ( 'git rev-parse --abbrev-ref HEAD' , initialBranch )
7372 . addExecSuccess ( 'git remote -v' , remote )
@@ -78,12 +77,7 @@ describe('Acceptance: ng github-pages:deploy', function() {
7877 . addExecSuccess ( `git push origin ${ ghPagesBranch } :${ ghPagesBranch } ` )
7978 . addExecSuccess ( 'git remote -v' , remote ) ;
8079
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' ] ) ;
8781 } ) ;
8882
8983 it ( 'should deploy with changed defaults' , function ( ) {
@@ -100,13 +94,7 @@ describe('Acceptance: ng github-pages:deploy', function() {
10094 . addExecSuccess ( `git push origin ${ ghPagesBranch } :${ userPageBranch } ` )
10195 . addExecSuccess ( 'git remote -v' , remote ) ;
10296
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' ] ) ;
11098 } ) ;
11199
112100 it ( 'should create branch if needed' , function ( ) {
@@ -125,12 +113,7 @@ describe('Acceptance: ng github-pages:deploy', function() {
125113 . addExecSuccess ( `git push origin ${ ghPagesBranch } :${ ghPagesBranch } ` )
126114 . addExecSuccess ( 'git remote -v' , remote ) ;
127115
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' ] ) ;
134117 } ) ;
135118
136119 it ( 'should create repo if needed' , function ( ) {
@@ -183,11 +166,6 @@ describe('Acceptance: ng github-pages:deploy', function() {
183166
184167 return ng ( [ 'github-pages:deploy' , '--skip-build' , `--gh-token=${ token } ` ,
185168 `--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 ) )
191169 . then ( ( ) => httpsStub . restore ( ) ) ;
192170 } ) ;
193171
0 commit comments