2021-10-03 17:28:17 +05:30
|
|
|
import { isScramble } from '../ScrambleStrings'
|
|
|
|
|
|
|
|
|
|
describe('ScrambleStrings', () => {
|
|
|
|
|
it('expects to return true for same string', () => {
|
|
|
|
|
expect(isScramble('a', 'a')).toBe(true)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
it('expects to return false for non-scrambled strings', () => {
|
|
|
|
|
expect(isScramble('abcde', 'caebd')).toBe(false)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
it('expects to return true for scrambled strings', () => {
|
|
|
|
|
expect(isScramble('great', 'rgeat')).toBe(true)
|
|
|
|
|
})
|
2021-10-03 17:31:45 +05:30
|
|
|
})
|