Skip to content

Commit acdfa8f

Browse files
committed
Fix indent
1 parent 7f37848 commit acdfa8f

File tree

1 file changed

+89
-89
lines changed

1 file changed

+89
-89
lines changed

test/deployer.js

Lines changed: 89 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -99,21 +99,21 @@ describe('deployer', function() {
9999
var extendDirName = pathFn.basename(extendDir);
100100

101101
return fs.writeFile(pathFn.join(extendDir, 'ext.txt'), 'ext')
102-
.then(function() {
103-
return deployer({
104-
repo: fakeRemote,
105-
extend_dirs: extendDirName,
106-
silent: true
102+
.then(function() {
103+
return deployer({
104+
repo: fakeRemote,
105+
extend_dirs: extendDirName,
106+
silent: true
107+
});
108+
}).then(function() {
109+
return validate();
110+
}).then(function() {
111+
var extTxtFile = pathFn.join(validateDir, extendDirName, 'ext.txt');
112+
113+
return fs.readFile(extTxtFile);
114+
}).then(function(content) {
115+
content.should.eql('ext');
107116
});
108-
}).then(function() {
109-
return validate();
110-
}).then(function() {
111-
var extTxtFile = pathFn.join(validateDir, extendDirName, 'ext.txt');
112-
113-
return fs.readFile(extTxtFile);
114-
}).then(function(content) {
115-
content.should.eql('ext');
116-
});
117117
});
118118

119119
it('multi deployment', function() {
@@ -136,41 +136,41 @@ describe('deployer', function() {
136136

137137
it('hidden file', function() {
138138
return fs.writeFile(pathFn.join(publicDir, '.hid'), 'hidden')
139-
.then(function() {
140-
return deployer({
141-
repo: fakeRemote,
142-
ignore_hidden: false,
143-
silent: true
139+
.then(function() {
140+
return deployer({
141+
repo: fakeRemote,
142+
ignore_hidden: false,
143+
silent: true
144+
});
145+
}).then(function() {
146+
return validate();
147+
}).then(function() {
148+
return fs.readFile(pathFn.join(validateDir, '.hid'));
149+
}).then(function(content) {
150+
content.should.eql('hidden');
144151
});
145-
}).then(function() {
146-
return validate();
147-
}).then(function() {
148-
return fs.readFile(pathFn.join(validateDir, '.hid'));
149-
}).then(function(content) {
150-
content.should.eql('hidden');
151-
});
152152
});
153153

154154
it('hidden extdir', function() {
155155
var extendDirName = pathFn.basename(extendDir);
156156

157157
return fs.writeFile(pathFn.join(extendDir, '.hid'), 'hidden')
158-
.then(function() {
159-
return deployer({
160-
repo: fakeRemote,
161-
extend_dirs: extendDirName,
162-
ignore_hidden: {public: true, extend: false},
163-
silent: true
158+
.then(function() {
159+
return deployer({
160+
repo: fakeRemote,
161+
extend_dirs: extendDirName,
162+
ignore_hidden: {public: true, extend: false},
163+
silent: true
164+
});
165+
}).then(function() {
166+
return validate();
167+
}).then(function() {
168+
var extHidFile = pathFn.join(validateDir, extendDirName, '.hid');
169+
170+
return fs.readFile(extHidFile);
171+
}).then(function(content) {
172+
content.should.eql('hidden');
164173
});
165-
}).then(function() {
166-
return validate();
167-
}).then(function() {
168-
var extHidFile = pathFn.join(validateDir, extendDirName, '.hid');
169-
170-
return fs.readFile(extHidFile);
171-
}).then(function(content) {
172-
content.should.eql('hidden');
173-
});
174174
});
175175

176176
it('hidden files', function() {
@@ -182,36 +182,36 @@ describe('deployer', function() {
182182
var extFileShow = fs.writeFile(pathFn.join(extendDir, 'show'), 'show');
183183

184184
return Promise.all([pubFileHid, extFileHid, extFileShow])
185-
.then(function() {
186-
return deployer({
187-
repo: fakeRemote,
188-
extend_dirs: extendDirName,
189-
ignore_pattern: 'hid',
190-
silent: true
185+
.then(function() {
186+
return deployer({
187+
repo: fakeRemote,
188+
extend_dirs: extendDirName,
189+
ignore_pattern: 'hid',
190+
silent: true
191+
});
192+
}).then(function() {
193+
return validate();
194+
}).then(function() {
195+
var isPubFileHidExisits = fs.exists(pathFn.join(validateDir, 'hid'));
196+
var isExtFileHidExisits = fs.exists(pathFn.join(validateDir, extendDirName, 'hid'));
197+
var isExtFileShowExisits = fs.exists(pathFn.join(validateDir, extendDirName, 'show'));
198+
199+
return Promise.all([isPubFileHidExisits, isExtFileHidExisits, isExtFileShowExisits]);
200+
}).then(function(statusLists) {
201+
var pubFileHidStatus = statusLists[0];
202+
var extFileHidStatus = statusLists[1];
203+
var extFileShowStatus = statusLists[2];
204+
205+
pubFileHidStatus.should.eql(false);
206+
extFileHidStatus.should.eql(false);
207+
extFileShowStatus.should.eql(true);
208+
}).then(function() {
209+
var extShowFile = pathFn.join(validateDir, extendDirName, 'show');
210+
211+
return fs.readFile(extShowFile);
212+
}).then(function(content) {
213+
content.should.eql('show');
191214
});
192-
}).then(function() {
193-
return validate();
194-
}).then(function() {
195-
var isPubFileHidExisits = fs.exists(pathFn.join(validateDir, 'hid'));
196-
var isExtFileHidExisits = fs.exists(pathFn.join(validateDir, extendDirName, 'hid'));
197-
var isExtFileShowExisits = fs.exists(pathFn.join(validateDir, extendDirName, 'show'));
198-
199-
return Promise.all([isPubFileHidExisits, isExtFileHidExisits, isExtFileShowExisits]);
200-
}).then(function(statusLists) {
201-
var pubFileHidStatus = statusLists[0];
202-
var extFileHidStatus = statusLists[1];
203-
var extFileShowStatus = statusLists[2];
204-
205-
pubFileHidStatus.should.eql(false);
206-
extFileHidStatus.should.eql(false);
207-
extFileShowStatus.should.eql(true);
208-
}).then(function() {
209-
var extShowFile = pathFn.join(validateDir, extendDirName, 'show');
210-
211-
return fs.readFile(extShowFile);
212-
}).then(function(content) {
213-
content.should.eql('show');
214-
});
215215
});
216216

217217
it('hidden extFiles', function() {
@@ -223,25 +223,25 @@ describe('deployer', function() {
223223
var pubFileHid = fs.writeFile(pathFn.join(publicDir, 'hid'), 'hidden');
224224

225225
return Promise.all([extFileHid, extFile2Hid, pubFileHid])
226-
.then(function() {
227-
return deployer({
228-
repo: fakeRemote,
229-
extend_dirs: extendDirName,
230-
ignore_pattern: {public: 'hid', extend: '.'},
231-
silent: true
226+
.then(function() {
227+
return deployer({
228+
repo: fakeRemote,
229+
extend_dirs: extendDirName,
230+
ignore_pattern: {public: 'hid', extend: '.'},
231+
silent: true
232+
});
233+
}).then(function() {
234+
return validate();
235+
}).then(function() {
236+
var isExtHidFileExists = fs.exists(pathFn.join(validateDir, extendDirName, 'hid'));
237+
var isExtHidFile2Exists = fs.exists(pathFn.join(validateDir, extendDirName, 'hid2'));
238+
var isPubHidFileExists = fs.exists(pathFn.join(validateDir, 'hid'));
239+
240+
return Promise.all([isExtHidFileExists, isExtHidFile2Exists, isPubHidFileExists]);
241+
}).then(function(statusLists) {
242+
statusLists.forEach(function(statusItem) {
243+
statusItem.should.eql(false);
244+
});
232245
});
233-
}).then(function() {
234-
return validate();
235-
}).then(function() {
236-
var isExtHidFileExists = fs.exists(pathFn.join(validateDir, extendDirName, 'hid'));
237-
var isExtHidFile2Exists = fs.exists(pathFn.join(validateDir, extendDirName, 'hid2'));
238-
var isPubHidFileExists = fs.exists(pathFn.join(validateDir, 'hid'));
239-
240-
return Promise.all([isExtHidFileExists, isExtHidFile2Exists, isPubHidFileExists]);
241-
}).then(function(statusLists) {
242-
statusLists.forEach(function(statusItem) {
243-
statusItem.should.eql(false);
244-
});
245-
});
246246
});
247247
});

0 commit comments

Comments
 (0)