js-practice/test/string/maximum-number-of-vowels-in-a-substring-of-given-length.test.js

7 lines
244 B
JavaScript
Raw Normal View History

import { maxVowels } from '../../src/string/maximum-number-of-vowels-in-a-substring-of-given-length'
test('定长子串中元音的最大数目', () => {
expect(maxVowels('abciiidef', 3)).toBe(3)
expect(maxVowels('rhythms', 4)).toBe(0)
})