-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
breaking changeCannot be merged when next version is not a major releaseCannot be merged when next version is not a major releasec: refactorPR that affects the runtime behavior, but doesn't add new features or fixes bugsPR that affects the runtime behavior, but doesn't add new features or fixes bugsm: wordSomething is referring to the word moduleSomething is referring to the word modulep: 1-normalNothing urgentNothing urgent
Milestone
Description
faker/test/modules/word.spec.ts
Lines 66 to 73 in d31579b
it('returns the word list if no words match the length', () => { | |
const result = filterWordListByLength({ | |
wordList, | |
length, | |
}); | |
// TODO @ST-DDT 2022-10-02: This should throw an error in the next major version. | |
expect(result).toEqual(wordList); | |
}); |
IMO if the user specifies a specific length for their words, then by default it should fail if the request cannot be fulfilled.
If the user wants a different behavior, then they can still define an explicit error handling strategy.
Found while looking at: #3261
Metadata
Metadata
Assignees
Labels
breaking changeCannot be merged when next version is not a major releaseCannot be merged when next version is not a major releasec: refactorPR that affects the runtime behavior, but doesn't add new features or fixes bugsPR that affects the runtime behavior, but doesn't add new features or fixes bugsm: wordSomething is referring to the word moduleSomething is referring to the word modulep: 1-normalNothing urgentNothing urgent