मेरे पास मेरे परीक्षण समूह में दो परीक्षण हैं। एक इसका उपयोग करता है दूसरा परीक्षण का उपयोग करता है, और वे बहुत समान काम कर रहे हैं। उनके बीच क्या अंतर है?जेस्ट में 'इसे' और 'परीक्षण' के बीच क्या अंतर है?
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);
})
});
});
अद्यतन:
ऐसा लगता है कि test
the official API of Jest में है, लेकिन it
नहीं है।
'यह' परिचितता और अन्य ढांचे से प्रवासन के लिए हो सकता है। – Li357
कोई फर्क नहीं पड़ता। दस्तावेज़ीकरण स्पष्ट रूप से बताता है कि 'test' उपनाम' it' के अंतर्गत है। – Claies
@Claies धन्यवाद, मैंने इसे नहीं देखा। कृपया इसे एक उत्तर के रूप में रखें। –