Ich brauche etwas Hilfe. Dies ist Fragment meines Codes, ich kann nicht Boolean von ihm zurück ("Gegenwart oder nicht") , so funktioniert alles falsch. wo habe ich mich geirrt?Winkelmesser-Test
describe("first TEST", function() {
var boolean, parsingAllProfiles, getRandomProfile, randomProfile;
it("present or not", function() {
freelan.notFreelancersFound.isPresent().then(function (result) {
**return boolean = result;**
})
})
if (boolean) {
console.log("NOTHING!!!!!")
} else {
it("array of profiles", function() {
Promise.resolve(freelan.parsingAllProfilePage()).then(function (profiles) {
var arrForCheck = freelan.cloneArray(profiles);
freelan.checkKeywordInProfile(arrForCheck, params.keyword);
return randomProfile = profiles[Math.floor(Math.random() * profiles.length)];
})
});
}
});
vielen Dank. Später habe ich verstanden, dass diese Bedingung "innerhalb der Kette" sein muss. – Dmytro