Created
June 20, 2021 22:39
-
-
Save ibrahimBanat/8cef3822ea90970b07b169c93a870de9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
const insertionSort = require("../insertionSort"); | |
describe("insertion sort testing", () => { | |
it("should sucessfully return sorted array", () => { | |
//arrange | |
let array = [8, 4, 23, 42, 16, 15]; | |
//act | |
let sorted = insertionSort(array); | |
//assert | |
expect(sorted.length).toEqual(6); | |
expect(sorted[0]).toEqual(4); | |
expect(sorted).toEqual([4, 8, 15, 16, 23, 42]); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment