Skip to content

Commit

Permalink
Add test case for #53 (#55)
Browse files Browse the repository at this point in the history
* Add test case for #53

* Update deployer.js

* Update deployer.js

* Update deployer.js

* Update deployer.js
  • Loading branch information
NoahDragon authored Dec 2, 2016
1 parent 924a843 commit 83fc0df
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion test/deployer.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,29 @@ describe('deployer', function() {
}).then(function() {
return validate();
}).then(function() {
return fs.readFile(pathFn.join(publicDir, '.hid'));
return fs.readFile(pathFn.join(validateDir, '.hid'));
}).then(function(content) {
content.should.eql('hidden');
});
});

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

return fs.writeFile(pathFn.join(extendDir, '.hid'), 'hidden')
.then(function() {
return deployer({
repo: fakeRemote,
extend_dirs: extendDirName,
ignore_hidden: {public: true, extend: false},
silent: true
});
}).then(function() {
return validate();
}).then(function() {
var extHidFile = pathFn.join(validateDir, extendDirName, '.hid');

return fs.readFile(extHidFile);
}).then(function(content) {
content.should.eql('hidden');
});
Expand Down

0 comments on commit 83fc0df

Please sign in to comment.