var selectSize = document.getElementById("selectSize")
var lengthSelectSize = selectSize.options.length
for(var i = 1; i < lengthSelectSize ; i++) {
selectSize.remove(i)
}
when I was about 13, I invited a good friend over, and after a few minutes of playing with ipad games, he took his belt out while saying "I haven't masturbated in so long. Do you want to masturbate?" completely serious. By the end of the sentence, he had his dick out
Check box Bootstrap Tree View function. we are getting the data from the database by using repater function we are viewing the parent and child view. when i click on doctor it enable the checkbox for all the child value. but doctor check box is not enabled. when i click on patient checkbox it di...
@OliverSalzburg I am way too overloaded at work (juggling too many things). So probably I'll apply for you guys in X-mas break. I really like what you guys are working on :P (after doing some market study).
So i'm trying to learn mocha and chai and all that. my biggest issues are around that i don't understand how to test promises. all my code looks so different to the examples and a lot of the examples are from 2 years ago and things might have moved along since then
I want to test the happy and the sad path... e.g. my function reads a text file and adds each line to an array in a happy path... if i pass it an invalid text file, it errors in the sad path
what are you unsure of? Mocha knows how to handle promises, there's a bit in the docs about it, and chai only cares if you want the expect(foo).to.eventually.equal(3) syntax. If you just await, chai doesn't care at all.
the only gotcha I've run into is leaking unresolved promises, which is easy to detect
@Zirak my configs allow for passing a cron expression. The consumer of it is bull.js, which afaik does not have a separate validation method for the expression, so I will only know when it throws an error. But, I would rather have the application fail during the config check. Three things I could use is 1. some little lib, but honestly I dont trust that these 1-starred ones available are legit, and I don't feel like pulling a bigger one just for that (Like later.js).
2. A regex, but I found so many different ones that I cannot tell which one is good. 3. an external web service
@BenFortune yeah I already was considering later, then I thought it's stupid to pull whole later just for that, but then I imagined other uses for it and I'm going with later