Skip to content

Commit b904859

Browse files
CitoIvanGoncharov
authored andcommitted
Add test for didYouMean with sub-message (#1988)
1 parent a9a21f3 commit b904859

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/jsutils/__tests__/didYouMean-test.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ describe('didYouMean', () => {
99
expect(didYouMean([])).to.equal('');
1010
});
1111

12-
it('Handle single suggestion', () => {
12+
it('Handles single suggestion', () => {
1313
expect(didYouMean(['A'])).to.equal(' Did you mean A?');
1414
});
1515

16-
it('Handle two suggestions', () => {
16+
it('Handles two suggestions', () => {
1717
expect(didYouMean(['A', 'B'])).to.equal(' Did you mean A or B?');
1818
});
1919

20-
it('Handle multiple suggestions', () => {
20+
it('Handles multiple suggestions', () => {
2121
expect(didYouMean(['A', 'B', 'C'])).to.equal(' Did you mean A, B, or C?');
2222
});
2323

@@ -26,4 +26,10 @@ describe('didYouMean', () => {
2626
' Did you mean A, B, C, D, or E?',
2727
);
2828
});
29+
30+
it('Adds sub-message', () => {
31+
expect(didYouMean('the letter', ['A'])).to.equal(
32+
' Did you mean the letter A?',
33+
);
34+
});
2935
});

0 commit comments

Comments
 (0)