{"size": 836, "ext": "js", "max_stars_repo_path": "javascript/arrays/challenges/quickSort/__tests__/quick-sort.test.js", "max_stars_repo_name": "401-repos/data-structure-and-algorithms", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "javascript/arrays/challenges/quickSort/__tests__/quick-sort.test.js", "max_issues_repo_name": "401-repos/data-structure-and-algorithms", "max_issues_repo_issues_event_min_datetime": "2021-05-17T20:58:17.000Z", "max_issues_repo_issues_event_max_datetime": "2021-06-01T18:13:34.000Z", "max_forks_repo_path": "javascript/arrays/challenges/quickSort/__tests__/quick-sort.test.js", "max_forks_repo_name": "401-repos/data-structure-and-algorithms", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 3, "max_forks_count": null, "avg_line_length": 32.1538461538, "max_line_length": 49, "alphanum_fraction": 0.5215311005}
'use strict';

const qSort = require('../quick-sort');

describe('quick sort', () => {
    it('should return a sorted array', () => {
        let array1 = [8,4,23,42,16,15];
        qSort(array1,0,array1.length-1);
        expect(array1).toEqual([4,8,15,16,23,42])
    });    
    it('should return a sorted array', () => {
        let array2 = [20,18,12,8,5,-2];
        qSort(array2,0,array2.length-1);
        expect(array2).toEqual([-2,5,8,12,18,20])
    });    
    it('should return a sorted array', () => {
        let array3 = [5,12,7,5,5,7];
        qSort(array3,0,array3.length-1);
        expect(array3).toEqual([5,5,5,7,7,12])
    });    
    it('should return a sorted array', () => {
        let array4 = [2,3,5,7,13,11];
        qSort(array4,0,array4.length-1);
        expect(array4).toEqual([2,3,5,7,11,13])
    });
});