I have found that expect() works within describe(). So the function test() is not necessary, if I see it right. Do I see it right?
In other words, is it enough to write that:
const sum = require('./sum'); describe('adds 1 + 2 to equal 3', () => { expect(sum(1, 2)).toBe(3); }); Or does that bring advantages:
const sum = require('./sum'); describe('test sum', () => { test('adds 1 + 2 to equal 3', () => { expect(sum(1, 2)).toBe(3); }); });
test(orit) withoutdescribe.