Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
.
I think I'm missing something. I have multiple problems with random tests, f.i. this SQL:
The test expect an empty array as the result, but the database has movies with that director, and the SQL seems to have all the needed joins as far as I can tell. It could be I haven't used SQL in a long time, but I fail to see the problem here.
PS: Btw, I forgot the test result:
Expected: '[]', instead got: '[{ \'movie.directorid\': 5,\n \'actor.name\': \'Robert Downey Jr.\',\n \'director.id\': 5 }, { \'movie.directorid\': 5,\n \'actor.name\': \'Gwyneth Paltrow\',\n \'director.id\': 5 }, { \'movie.directorid\': 5,\n \'actor.name\': \'Terrence Howard\',\n \'director.id\': 5 }, { \'movie.directorid\': 5,\n \'actor.name\': \'Jeff Bridges\',\n \'director.id\': 5 }]'
Oh! I see it now.
Thanks!
This is because the tests terminated early due to the STDERR that occurred. And if your solution is returning incorrect values, it will terminate the tests early. The reason you're only seeing one bulletin is because the tests terminated before getting past the first day.
You do have it, it shows up in green(?); it's not from a
console.log
, but rather from anit
ordescribe
block (i.e. unit test).As for the question about the date, it's provided in the Description under Conditions for passing inspection:
All documents are current (ie. none have expired) -- a document is considered expired if the expiration date is November 22, 1982 or earlier
That's the first part of the output, after that, inspect logs keep coming but no more bulletin logs, there's only one of those at the top. I copy/paste:
As you can see there's only one bulletin, after that all inspections keep coming all together without any other bulletin call.
Also, do you have a date there, at the beginning of the log you copied? I don't have that either.
And I have this error at the end, I'm not sure what it means:
The two methods are being called. In the tests, there are 31 days of service. At the start of each day, the
receiveBulletin
method is called, then theinspect
method is called on each entrant for that day.I'm not sure what you're reading, but when I tested your solution this is the first console log that appeared:
The things you're describing are not what is happening when I run your solution.
Maybe someone could help me, I'm on javascript. I don't understand how the tests work.
I have logs both in my receiveBulletin and inspect functions, and it seems that recieveBulletin is getting called only one time, but from the tests messages I'm seeing that the data passed through that function are supposed to change between cases (wanted person, nations denied or allowed, etc), and I'm failing cases because of this.
I supposed that test cases would call receiveBulletin before inspect, but my logs are not being called(first line of receiveBulletin is "console.log("********* BULLETIN")"...), so the function are not being called and the data are not being updated, therefore the tests fails.
Also, is date supposed to change? I haven't seen anything about this in the description of the kata, only says date is 1982-11-23.
Also, the logs are not next to the each test case, they are all together at the top of the output window and then all the results at the bottom... is this normal? never seen it before this way at codewars.
I love the theme of the kata but... I'm missing something important or it's a really weird kata.
"answer"