Hong-Phuc Bui
2025-01-16 2889de7f0c2d587a17fbd322af57c29e84238620
1
2
3
4
5
6
7
8
9
10
11
12
import {expect, test} from "@jest/globals";
 
const whatToBeTested = [
    /*mutating function, returned value of mutating function, mutated array, not-mutating function, returned value of not-mutated function*/
];
 
test("pop is mutable", () => {
    const testArray =["Januar", "Februar", "Mars", "April"];
    const result = testArray.pop();
    expect(result).toBe(null);
    expect(testArray).toBe(null);
});