Skip to content

Commit

Permalink
Add a new test case for leading dots in file extension declaration. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
JimiC authored and robertohuertasm committed Dec 13, 2016
1 parent a4f375e commit 26562a7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/iconGenerator.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ describe('generating icons', function () {
expect(iconGenerator.getPathToDirName(toDirName, fromDirPath)).toEqual(pathTo);
});

it('file extension should not have a leading dot', function () {
files.supported
.filter(function (file) { return !file.filename; })
.forEach(function (file) {
file.extensions.forEach(function (extension) {
expect(extension.startsWith('.')).toBeFalsy();
});
});
});

it('ensures each supported file extension has an associated icon file', function () {
var suffix = '@2x';
var iconDirPath = iconGenerator.getPathToDirName('icons', '.');
Expand Down Expand Up @@ -144,7 +154,7 @@ describe('generating icons', function () {
var fileExtensions = iconGenerator.buildJsonStructure().files.names.fileExtensions;

files.supported
.filter(function (file) { return !file.filename && !file.languages; })
.filter(function (file) { return !file.filename; })
.forEach(function (file) {
var definition = '_f_' + file.icon;
file.extensions.forEach(function (extension) {
Expand Down

0 comments on commit 26562a7

Please sign in to comment.