摘要:
somereturns abooleanvalue after passing each item in the source array through the test function that you pass in as the first parameter. This makes it... 阅读全文
摘要:
When you render a component with the Shallow Renderer, you have access to the underlying object. We can write lots of useful tests to check that our c... 阅读全文
摘要:
When writing React component tests, it can be hard to decipher the error diffs of broken tests, since they are just the final objects that React uses ... 阅读全文
摘要:
In this lesson, we walk through how to use one of React's Test Utilities (from thereact-addons-test-utilspackage) called "Shallow Rendering". This let... 阅读全文
摘要:
JSON(JavaScript Object Notation) is a standard method to serialize JavaScript objects and is commonly used to transfer data from the server to the bro... 阅读全文
摘要:
To write tests for our React code, we need to first install some libraries for running tests and writing assertions. In this lesson we walk through se... 阅读全文
摘要:
We can use the destructing and rest parameters at the same time when dealing with Array opration.Example 1:let [first, ...remainingUsers] = ["Sam", "T... 阅读全文
摘要:
The spread operator allow us to split an Array arguement into individual elements.getRequest("/topics/17/tags", function(data){ let tags = data.tag... 阅读全文