Skip to content

Commit

Permalink
Improved test coverage for the App faker.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrstebo committed Apr 10, 2017
1 parent b38895e commit 37fae1c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/faker/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function name() {
export function version() {
return itemFromCollection(VERSION_FORMATS)
.split('.')
.map(i => i =='#' ? randomNumber(0, 10) : i)
.map(parseNumber)
.join('.');
}

Expand All @@ -27,3 +27,7 @@ export function author() {
itemFromCollection(nameData['lastNames'])
].join(' ');
}

function parseNumber(n) {
return n == '#' ? randomNumber(0, 9) : n;
}

0 comments on commit 37fae1c

Please sign in to comment.