Different functions are mocked in the sample and actual tests, in sample tests global.setInterval is mocked while in the actual tests setInterval is mocked. They're different.
The entirety of this custom fetch function is illegal: it doesn't obey the standards of window.fetch, which should return a response object that requires .json() to read.
And why reading .json file returns text as a string?
This comment is hidden because it contains spoiler information about the solution
event.target don't provide properties as name, id, type. Just the property "value"
Kata should update to allow new syntaxes and commands including useState and useRef. (currently they cannot be used)
why such old version of react? useState is not defined in React.
This comment is hidden because it contains spoiler information about the solution
Different functions are mocked in the sample and actual tests, in sample tests
global.setInterval
is mocked while in the actual testssetInterval
is mocked. They're different.The entirety of this custom
fetch
function is illegal: it doesn't obey the standards ofwindow.fetch
, which should return a response object that requires.json()
to read.And why reading
.json
file returns text as a string?Wasn't it said that the id should be set to 'priority'?
There is 'select' id instead of 'priority' in the last test.
It is lead to "event.target.id === 'select' ? 'priority' : event.target.id" construction.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
It's an issue. You forgot to add name:'name' here: .simulate("change", { target: { value: "Peter" } });
It should be: .simulate("change", { name:'name', target: { value: "Peter" } });
The test description is wrong:
the actual testcase tested the class property
this.timerId
. Noticetimer
vstime
.Got me stuck for a long time...
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...