Skip to content

Commit

Permalink
fix(key-syllables): defaulted simpleObject keys to 3 syllables
Browse files Browse the repository at this point in the history
this should reduce collisions with keys that have significance in the systems under test, like `id`
or a react `key`
  • Loading branch information
travi committed Jul 10, 2017
1 parent 9de8f04 commit e84ac15
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion any.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function simpleObject() {
const size = integer(DEFAULT_SIZE_RANGE);

for (let i = 0; i < size; i += 1) {
object[word()] = string();
object[word({syllables: 3})] = string();
}

return object;
Expand Down
1 change: 1 addition & 0 deletions test/unit/any-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ suite('random data generator', () => {
const object = any.simpleObject();

assert.equal(Object.keys(object).length, objectSize);
assert.alwaysCalledWith(chanceStub.word, {syllables: 3});
for (let i = 0; i < objectSize; i += 1) {
assert.equal(object[words[i]], strings[i]);
}
Expand Down

0 comments on commit e84ac15

Please sign in to comment.