mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-20 10:37:07 +08:00
15 lines
305 B
JavaScript
15 lines
305 B
JavaScript
import { permutations } from '../GeneratePermutations'
|
|
|
|
describe('Permutations', () => {
|
|
it('Permutations of [1, 2, 3]', () => {
|
|
expect(permutations([1, 2, 3])).toEqual([
|
|
[ 1, 2, 3 ],
|
|
[ 1, 3, 2 ],
|
|
[ 2, 1, 3 ],
|
|
[ 2, 3, 1 ],
|
|
[ 3, 1, 2 ],
|
|
[ 3, 2, 1 ]
|
|
])
|
|
})
|
|
})
|