GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — JavaScript/Sorts/test/ShellSort.test.js at master · TheAlgorithms/JavaScript

Expand file tree

/

ShellSort.test.js

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
25 lines (21 loc) · 729 Bytes
/

ShellSort.test.js

Copy path

File metadata and controls

25 lines (21 loc) · 729 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { shellSort } from '../ShellSort'
test('The ShellSort of the array [5, 4, 3, 2, 1] is [1, 2, 3, 4, 5]', () => {
const arr = [5, 4, 3, 2, 1]
const res = shellSort(arr)
expect(res).toEqual([1, 2, 3, 4, 5])
})
test('The ShellSort of the array [] is []', () => {
const arr = []
const res = shellSort(arr)
expect(res).toEqual([])
})
test('The ShellSort of the array [15, 24, 31, 42, 11] is [11, 15, 24, 31, 42]', () => {
const arr = [15, 24, 31, 42, 11]
const res = shellSort(arr)
expect(res).toEqual([11, 15, 24, 31, 42])
})
test('The ShellSort of the array [121, 190, 169] is [121, 169, 190]', () => {
const arr = [121, 190, 169]
const res = shellSort(arr)
expect(res).toEqual([121, 169, 190])
})
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.