mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-05 08:16:50 +08:00
16 lines
436 B
JavaScript
16 lines
436 B
JavaScript
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)
|
|
})
|
|
})
|