javascript - What is the difference between 'it' and 'test' in jest? -
i have 2 tests in test group. 1 uses other 1 uses test, , seem working similarly. difference between them?
describe('updateall', () => { it('no force', () => { return updateall(tablename, ["filename"], {compandid: "test"}) .then(updateditems => { let undefinedcount = 0; (let item of updateditems) { undefinedcount += item === undefined ? 1 : 0; } // console.log("result", result); expect(undefinedcount).tobe(updateditems.length); }) }); test('force update', () => { return updateall(tablename, ["filename"], {compandid: "test"}, true) .then(updateditems => { let undefinedcount = 0; (let item of updateditems) { undefinedcount += item === undefined ? 1 : 0; } // console.log("result", result); expect(undefinedcount).tobe(0); }) }); });
update:
it seems test
in the official api of jest, it
not.
Comments
Post a Comment