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.
when I try:
const res = await fetch(apiUrl);
if (!res.ok) throw new Error(
No jokes at url: ${apiUrl}
);solution can't pass the tests
There is no such section anywhere anymore
All the test are passing, but when I submit the attempt I get the following error:
EasterEgg should render li element with a name
Test Failed
Failure
TypeError: Cannot read property 'contextTypes' of undefined
TypeScript translation based on existing JavaScript version.
great one
https://www.codewars.com/kata/5a95947f4a6b342636000173/train/javascript
When I try to submit it it gives error expected "Bunny" and my result shows " Bunny "
in the preloaded section, there is a function called
fetch()
written by the kata author. call it with an url. it mimicks the behavior of the real fetch APInot a proper issue report
could anyone help?)
I've stucked with the problem
function (it) run longer that 500ms
Oh god. It was really painfully. I sat with this problem for several hours(about 4-5).
As a result, the error was that fetch(url) should ALWAYS come immediately followed by ".then()".
You can't write
But I dont know why. May be it is related with a microtasks stack? If there is anyone who knows, please tell me the topics that I could read
new FetchError(
request to ${request.url} failed, reason: ${err.message}
, 'system', err)Ok. Nice exercice for Christmas. I try to write a test for errors. It should throw an error if the given joke id does not exist.
This code doesn't work. I think, it get a promise and don't test the method.
How I can implement it ?
You have to add a 'saySetup' and 'sayPunchLine' methods to the object of your result. So that e.g. result.saySetup() returns the corrent answer.
Tests are running against a valid api endpoint (that is hidden from us).
What you have to do :
A useful link :
https://reactjs.org/docs/higher-order-components.html#use-hocs-for-cross-cutting-concerns
Loading more items...