Added test for ScrambleStrings and formatted folder structure for other folders

This commit is contained in:
Omkarnath Parida
2021-10-03 17:28:17 +05:30
parent 255ef9a50d
commit c198a9f53d
12 changed files with 26 additions and 11 deletions

View File

@@ -0,0 +1,15 @@
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)
})
})