parent
18813776ca
commit
010f88aa1b
|
@ -1,4 +1,3 @@
|
|||
import _ from 'lodash';
|
||||
import sanitizeFilenameLib from 'sanitize-filename';
|
||||
import { DEFAULT_APP_NAME } from '../constants';
|
||||
|
||||
|
@ -11,7 +10,7 @@ export default function(platform, str) {
|
|||
|
||||
// spaces will cause problems with Ubuntu when pinned to the dock
|
||||
if (platform === 'linux') {
|
||||
return _.kebabCase(result);
|
||||
return result.replace(/ /g, '');
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -27,9 +27,9 @@ describe('replacing non ascii characters', () => {
|
|||
});
|
||||
|
||||
describe('when the platform is linux', () => {
|
||||
test('it should return a kebab cased name', () => {
|
||||
test('it should return a name without spaces', () => {
|
||||
const param = 'some name';
|
||||
const expectedResult = 'some-name';
|
||||
const expectedResult = 'somename';
|
||||
const result = sanitizeFilename('linux', param);
|
||||
expect(result).toBe(expectedResult);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue