js-practice/test/string/longest-palindromic-substring.test.js
2020-05-22 21:25:03 +08:00

7 lines
246 B
JavaScript

import { longestPalindrome } from '../../src/string/longest-palindromic-substring'
test('最长回文字符串', () => {
expect(longestPalindrome('babad')).toBe('aba') // bab也是有效答案
expect(longestPalindrome('cbbd')).toBe('bb')
})