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 — Add merge sort. · BrandonWeb/javascript-algorithms@f29bcab

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src/algorithms/sorting/merge-sort/__test__
    • MergeSort.test.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/algorithms/sorting/merge-sort/__test__/MergeSort.test.js‎

Copy file name to clipboardExpand all lines: src/algorithms/sorting/merge-sort/__test__/MergeSort.test.js
+8-8Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import BubbleSort from '../MergeSort';
1+
import MergeSort from '../MergeSort';
22
import {
33
equalArr,
44
notSortedArr,
@@ -15,44 +15,44 @@ const EQUAL_ARRAY_VISITING_COUNT = 79;
1515

1616
describe('MergeSort', () => {
1717
it('should sort array', () => {
18-
SortTester.testSort(BubbleSort);
18+
SortTester.testSort(MergeSort);
1919
});
2020

2121
it('should sort array with custom comparator', () => {
22-
SortTester.testSortWithCustomComparator(BubbleSort);
22+
SortTester.testSortWithCustomComparator(MergeSort);
2323
});
2424

2525
it('should do stable sorting', () => {
26-
SortTester.testSortStability(BubbleSort);
26+
SortTester.testSortStability(MergeSort);
2727
});
2828

2929
it('should visit EQUAL array element specified number of times', () => {
3030
SortTester.testAlgorithmTimeComplexity(
31-
BubbleSort,
31+
MergeSort,
3232
equalArr,
3333
EQUAL_ARRAY_VISITING_COUNT,
3434
);
3535
});
3636

3737
it('should visit SORTED array element specified number of times', () => {
3838
SortTester.testAlgorithmTimeComplexity(
39-
BubbleSort,
39+
MergeSort,
4040
sortedArr,
4141
SORTED_ARRAY_VISITING_COUNT,
4242
);
4343
});
4444

4545
it('should visit NOT SORTED array element specified number of times', () => {
4646
SortTester.testAlgorithmTimeComplexity(
47-
BubbleSort,
47+
MergeSort,
4848
notSortedArr,
4949
NOT_SORTED_ARRAY_VISITING_COUNT,
5050
);
5151
});
5252

5353
it('should visit REVERSE SORTED array element specified number of times', () => {
5454
SortTester.testAlgorithmTimeComplexity(
55-
BubbleSort,
55+
MergeSort,
5656
reverseArr,
5757
REVERSE_SORTED_ARRAY_VISITING_COUNT,
5858
);

0 commit comments

Comments
0 (0)
You are visitor 01402792 — 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.