refactor: address review comments from #1351 (#1355)

See: https://github.com/resin-io/etcher/pull/1351
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
This commit is contained in:
Juan Cruz Viotti 2017-04-26 11:05:36 -04:00 committed by GitHub
parent 30c531417a
commit 23a5e53d50
2 changed files with 13 additions and 13 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2017 resin.io * Copyright 2016 resin.io
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -39,7 +39,7 @@ describe('Shared: permissions', function() {
m.chai.expect(permissions.getEnvironmentCommandPrefix()).to.deep.equal([]); m.chai.expect(permissions.getEnvironmentCommandPrefix()).to.deep.equal([]);
}); });
it('should return an empty array environment is an empty object', function() { it('should return an empty array if the environment is an empty object', function() {
m.chai.expect(permissions.getEnvironmentCommandPrefix({})).to.deep.equal([]); m.chai.expect(permissions.getEnvironmentCommandPrefix({})).to.deep.equal([]);
}); });
@ -76,11 +76,11 @@ describe('Shared: permissions', function() {
it('should ignore undefined and null variable values', function() { it('should ignore undefined and null variable values', function() {
m.chai.expect(permissions.getEnvironmentCommandPrefix({ m.chai.expect(permissions.getEnvironmentCommandPrefix({
FOO: null, FOO: null,
BAR: undefined, BAR: 'qux',
BAZ: 'qux' BAZ: undefined
})).to.deep.equal([ })).to.deep.equal([
'set', 'set',
'BAZ=qux', 'BAR=qux',
'&&', '&&',
'call' 'call'
]); ]);
@ -122,7 +122,7 @@ describe('Shared: permissions', function() {
m.chai.expect(permissions.getEnvironmentCommandPrefix()).to.deep.equal([]); m.chai.expect(permissions.getEnvironmentCommandPrefix()).to.deep.equal([]);
}); });
it('should return an empty array environment is an empty object', function() { it('should return an empty array if the environment is an empty object', function() {
m.chai.expect(permissions.getEnvironmentCommandPrefix({})).to.deep.equal([]); m.chai.expect(permissions.getEnvironmentCommandPrefix({})).to.deep.equal([]);
}); });
@ -151,11 +151,11 @@ describe('Shared: permissions', function() {
it('should ignore undefined and null variable values', function() { it('should ignore undefined and null variable values', function() {
m.chai.expect(permissions.getEnvironmentCommandPrefix({ m.chai.expect(permissions.getEnvironmentCommandPrefix({
FOO: null, FOO: null,
BAR: undefined, BAR: 'qux',
BAZ: 'qux' BAZ: undefined
})).to.deep.equal([ })).to.deep.equal([
'env', 'env',
'BAZ=qux' 'BAR=qux'
]); ]);
}); });
@ -189,7 +189,7 @@ describe('Shared: permissions', function() {
m.chai.expect(permissions.getEnvironmentCommandPrefix()).to.deep.equal([]); m.chai.expect(permissions.getEnvironmentCommandPrefix()).to.deep.equal([]);
}); });
it('should return an empty array environment is an empty object', function() { it('should return an empty array if the environment is an empty object', function() {
m.chai.expect(permissions.getEnvironmentCommandPrefix({})).to.deep.equal([]); m.chai.expect(permissions.getEnvironmentCommandPrefix({})).to.deep.equal([]);
}); });
@ -218,11 +218,11 @@ describe('Shared: permissions', function() {
it('should ignore undefined and null variable values', function() { it('should ignore undefined and null variable values', function() {
m.chai.expect(permissions.getEnvironmentCommandPrefix({ m.chai.expect(permissions.getEnvironmentCommandPrefix({
FOO: null, FOO: null,
BAR: undefined, BAR: 'qux',
BAZ: 'qux' BAZ: undefined
})).to.deep.equal([ })).to.deep.equal([
'env', 'env',
'BAZ=qux' 'BAR=qux'
]); ]);
}); });