Test register prompt as on dumb terminal (fixes travis)

This commit is contained in:
Adam Stankiewicz
2015-01-06 02:24:39 +01:00
parent 7c82da8389
commit 39491b78b1
2 changed files with 5 additions and 2 deletions

View File

@@ -100,7 +100,7 @@ describe('bower register', function () {
return helpers.expectEvent(promise.logger, 'confirm')
.spread(helpers.ensureDone(done, function(e) {
expect(e.type).to.be('confirm');
expect(e.message).to.be('Registering a package will make it installable via the registry (\u001b[4m\u001b[36mhttps://bower.herokuapp.com\u001b[39m\u001b[24m), continue?');
expect(e.message).to.be('Registering a package will make it installable via the registry (https://bower.herokuapp.com), continue?');
expect(e.default).to.be(true);
}));
});

View File

@@ -1,3 +1,6 @@
// So CLI output is monochrome in tests
process.env.TERM = 'dumb';
var Q = require('q');
var path = require('path');
var mkdirp = require('mkdirp');
@@ -18,7 +21,7 @@ var env = {
'GIT_AUTHOR_EMAIL': 'amdfcruz@gmail.com',
'GIT_COMMITTER_DATE': 'Sun Apr 7 22:13:13 2013 +0000',
'GIT_COMMITTER_NAME': 'André Cruz',
'GIT_COMMITTER_EMAIL': 'amdfcruz@gmail.com'
'GIT_COMMITTER_EMAIL': 'amdfcruz@gmail.com',
};
// Preserve the original environment