Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default word filtering strategy to fail #3263

Open
ST-DDT opened this issue Nov 14, 2024 · 0 comments
Open

Change default word filtering strategy to fail #3263

ST-DDT opened this issue Nov 14, 2024 · 0 comments
Labels
breaking change Cannot be merged when next version is not a major release c: refactor PR that affects the runtime behavior, but doesn't add new features or fixes bugs m: word Something is referring to the word module p: 1-normal Nothing urgent s: needs decision Needs team/maintainer decision
Milestone

Comments

@ST-DDT
Copy link
Member

ST-DDT commented Nov 14, 2024

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

@ST-DDT ST-DDT added p: 1-normal Nothing urgent s: needs decision Needs team/maintainer decision c: refactor PR that affects the runtime behavior, but doesn't add new features or fixes bugs breaking change Cannot be merged when next version is not a major release m: word Something is referring to the word module labels Nov 14, 2024
@ST-DDT ST-DDT added this to the v10.0 milestone Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Cannot be merged when next version is not a major release c: refactor PR that affects the runtime behavior, but doesn't add new features or fixes bugs m: word Something is referring to the word module p: 1-normal Nothing urgent s: needs decision Needs team/maintainer decision
Projects
None yet
Development

No branches or pull requests

1 participant