Running a test intro
Wed Feb 22 2023 19:28:16 GMT+0000 (Coordinated Universal Time)
Saved by
@AlanaBF
#javascript
#nodejs
const Arithmetic = require("../arithmetic");
//tests arithmetic class
describe("Arithmetic", () => {
//organizational tool containing tests
describe("Initialization", () => {
it("should set 'number' when created", () => {
// Arrange
const num = 108;
// Act
const obj = new Arithmetic(num);
// Assert
expect(obj.number).toEqual(num);
});
})
})
content_copyCOPY
Comments