Skip to content

Commit

Permalink
Jest add() & sub()
Browse files Browse the repository at this point in the history
  • Loading branch information
GoToLoop committed Sep 8, 2023
1 parent 56569c8 commit 139ea96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/complex.jest.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('Complex', () => {
expect(result.imag).toBe(6);
});

it('should add a complex number and a real number', () => {
it('should add the real part of a complex and a real number', () => {
const complex = new Complex(1, 2);
const result = complex.add(3);
expect(result.real).toBe(4);
Expand All @@ -56,7 +56,7 @@ describe('Complex', () => {
expect(result.imag).toBe(-2);
});

it('should subtract a complex number and a real number', () => {
it('should subtract the real part of a complex and a real number', () => {
const complex = new Complex(1, 2);
const result = complex.sub(3);
expect(result.real).toBe(-2);
Expand Down

0 comments on commit 139ea96

Please sign in to comment.