Use spoiler flag please.
This comment is hidden because it contains spoiler information about the solution
Read that back .. if it's not resolved, why is it closed?
Good job on all the resolving you're doing. This kata is now approvablem but you don't seem to be doing that. Any particular reason? ( You know you can search for needs_approval in Kata Search? )
That was added, issue not resolved.
Sorry. It happens.
Ahhh, crap. I thought I'd searched thoroughly to not have created a dup, but you're dead on. This is definitely a copy of that one and that one is better, so I'll unpublish this.
In the example tests, in the third test, "valid child3" is included twice. This caused a duplicate ID error for my map. The actual kata tests didn't have this scenario so it's probably an errant duplicate?
Fun kata. THANKS!
Great catch. I took it for granted that it would fail if not resolved, but it just skipped all the tests and succeeded! It now has a check that the Promise comes back resolved.
I fully agree seeing the different solutions was nice; that is, in my opinion also, a mark of a good kata.
Are you testing the Promise is resolved also? Adding it to the description, but then allowing uncomplying solutions to pass, is not good.
It was cool to see different ways to solve this, so I don't see one option being better than the other. I'll add to the description that the Promise must be resolved.
It is unspecified that the return value has to be resolved already. That's OK. ( I think. )
If we return an unresolved Promise, it is not checked that it'll return "Hello World!" when it is resolved. That's not OK.
I'm getting a feeling this is not quite a good introduction to Promises.
What is really the better solution: the example solution or Unnamed's ?
In my attempted solution, I am declaring a promise, and then a little debugging with console.log shows that this promise has indeed been defined. But when I try to reference the .then property of this promise, I get the message: "Cannot read property 'then' of undefined". If the problem here is my ignorance of how promises work, can someone point me to a good online resource to enlighten me?
Never mind; I figured it out :-)