I have two tests in my test group.(我的测试组中有两个测试。)
One uses it the other one uses test, and they seem to be working very similarly.(一个使用它,另一个使用测试,他们似乎工作得非常相似。) What is the difference between them?(它们之间有什么区别?)
describe('updateAll', () => {
it('no force', () => {
return updateAll(TableName, ["fileName"], {compandId: "test"})
.then(updatedItems => {
let undefinedCount = 0;
for (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;
for (let item of updatedItems) {
undefinedCount += item === undefined ? 1 : 0;
}
// console.log("result", result);
expect(undefinedCount).toBe(0);
})
});
});
UPDATE:(更新:)
It seems that test
is in the official API of Jest , but it
is not.(test
似乎在Jest的官方API中 ,但it
并非如此。)
ask by C.Lee translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…