摘要:
Sometimes we want to test our Redux reducers to make sure they work as expected. In this lesson we will walk through setting up some Redux reducer tes... 阅读全文
摘要:
When using Redux, we can test that our application state changes are working by testing that dispatching actions to the store creates our expected out... 阅读全文
摘要:
.blue{ color: blue}.bold{ font-weight: bold;}.large{ font-size: 40px;}ngClass can accept an array:ngClassngClass can take a string:ngClassngClas... 阅读全文
摘要:
When testing React components, we often want to make sure the rendered output of the component matches what we expect. With the React Shallow Renderer... 阅读全文
摘要:
Setting up a shallow renderer for each test can be redundant, especially when trying to write similar tests that have slight tweaks. In this lesson, w... 阅读全文
摘要:
Often our components have output that shows differently depending on the props it is given; in this lesson, we go over how to compare theclassNameprop... 阅读全文
摘要:
The React Shallow Renderer test utility lets us inspect the output of a component one level deep. In this lesson, we will examine the rendered output ... 阅读全文
摘要:
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 ... 阅读全文