@@ -70,28 +70,14 @@ async function getWorkDir(): Promise<string> {
7070}
7171
7272describe ( 'addNoJekyll()' , ( ) => {
73- test ( 'add .nojekyll gh-pages ' , async ( ) => {
73+ test ( 'add .nojekyll' , async ( ) => {
7474 let workDir = '' ;
7575 ( async ( ) : Promise < void > => {
7676 workDir = await getWorkDir ( ) ;
7777 } ) ( ) ;
7878 const filepath = path . join ( workDir , '.nojekyll' ) ;
7979
80- await addNoJekyll ( workDir , false , 'gh-pages' ) ;
81- const test = fs . existsSync ( filepath ) ;
82- expect ( test ) . toBe ( true ) ;
83-
84- fs . unlinkSync ( filepath ) ;
85- } ) ;
86-
87- test ( 'add .nojekyll master' , async ( ) => {
88- let workDir = '' ;
89- ( async ( ) : Promise < void > => {
90- workDir = await getWorkDir ( ) ;
91- } ) ( ) ;
92- const filepath = path . join ( workDir , '.nojekyll' ) ;
93-
94- await addNoJekyll ( workDir , false , 'master' ) ;
80+ await addNoJekyll ( workDir , false ) ;
9581 const test = fs . existsSync ( filepath ) ;
9682 expect ( test ) . toBe ( true ) ;
9783
@@ -106,57 +92,21 @@ describe('addNoJekyll()', () => {
10692 const filepath = path . join ( workDir , '.nojekyll' ) ;
10793 fs . closeSync ( fs . openSync ( filepath , 'w' ) ) ;
10894
109- await addNoJekyll ( workDir , false , 'master' ) ;
95+ await addNoJekyll ( workDir , false ) ;
11096 const test = fs . existsSync ( filepath ) ;
11197 expect ( test ) . toBe ( true ) ;
11298
11399 fs . unlinkSync ( filepath ) ;
114100 } ) ;
115101
116- test ( 'not add .nojekyll disable_nojekyll gh-pages' , async ( ) => {
117- let workDir = '' ;
118- ( async ( ) : Promise < void > => {
119- workDir = await getWorkDir ( ) ;
120- } ) ( ) ;
121- const filepath = path . join ( workDir , '.nojekyll' ) ;
122-
123- await addNoJekyll ( workDir , true , 'gh-pages' ) ;
124- const test = fs . existsSync ( filepath ) ;
125- expect ( test ) . toBe ( false ) ;
126- } ) ;
127-
128- test ( 'not add .nojekyll disable_nojekyll master' , async ( ) => {
129- let workDir = '' ;
130- ( async ( ) : Promise < void > => {
131- workDir = await getWorkDir ( ) ;
132- } ) ( ) ;
133- const filepath = path . join ( workDir , '.nojekyll' ) ;
134-
135- await addNoJekyll ( workDir , true , 'master' ) ;
136- const test = fs . existsSync ( filepath ) ;
137- expect ( test ) . toBe ( false ) ;
138- } ) ;
139-
140- test ( 'not add .nojekyll other-branch' , async ( ) => {
141- let workDir = '' ;
142- ( async ( ) : Promise < void > => {
143- workDir = await getWorkDir ( ) ;
144- } ) ( ) ;
145- const filepath = path . join ( workDir , '.nojekyll' ) ;
146-
147- await addNoJekyll ( workDir , false , 'other-branch' ) ;
148- const test = fs . existsSync ( filepath ) ;
149- expect ( test ) . toBe ( false ) ;
150- } ) ;
151-
152- test ( 'not add .nojekyll disable_nojekyll other-branch' , async ( ) => {
102+ test ( 'not add .nojekyll disable_nojekyll' , async ( ) => {
153103 let workDir = '' ;
154104 ( async ( ) : Promise < void > => {
155105 workDir = await getWorkDir ( ) ;
156106 } ) ( ) ;
157107 const filepath = path . join ( workDir , '.nojekyll' ) ;
158108
159- await addNoJekyll ( workDir , true , 'other-branch' ) ;
109+ await addNoJekyll ( workDir , true ) ;
160110 const test = fs . existsSync ( filepath ) ;
161111 expect ( test ) . toBe ( false ) ;
162112 } ) ;
0 commit comments