Lines Matching full:test

3 The goal of a unit test is to improve code quality and assure future development
16 ## Test Libraries
18 The OpenBMC Web UI unit test framework uses the Jest test runner and relies on
22 - @vue/test-utils
24 ## Test specification location and naming conventions
26 - Create the test files in the /tests/unit directory
40 The `test:unit` script will run all the test suites. Until the integration of
41 the test script with the continuous integration tool is complete, it needs to be
43 test that is failing, follow the guidelines for debugging a failed tests or
46 ### Debugging a failed test
48 The `test:unit:debugger` script will help to debug failing tests using the
49 Chrome Developer Tools. To debug a test:
52 1. Run the unit test in debugger mode
57 The `test:update` script will update snapshot tests. If the UI has changed and
59 update script to update the snapshots. Running `test:update` can be dangerous,
63 The easiest way is to run the unit test in watch mode,
64 `npm run test:unit -- --watch` and verify each snapshot.
68 - Avoid coupling test code to source code when testing functionality
69 - If test cases fail during refactoring, the test case may be tightly coupled
71 - A test should not break if the functionality it tests has not changed
72 - To maintain test readability, only pass in the data needed for the test to
83 ### What to test
85 1. Test the function's inputs and outputs
86 - Test only dynamically generated output
87 - Test only output that is part of the component contract
88 1. Test any side-effects
89 1. Test correct rendering using a snapshot test
91 ### What not to test
93 1. Don't test third-party functionality
94 1. Don't test the internals of your components or that specific functions are
97 1. Don't test the functionality of other libraries
104 1. Test the component API by writing tests first and then writing code to fix
106 1. Add a snapshot test once the presentational layer is validated through manual
111 A snapshot test is a comparison of the code from two different points in time.
112 When the view is rendering as expected, a snapshot is taken and when the test
127 `test store parts separately`.
132 function. Store parts to test include `actions`, `getters`, and `mutations`.
136 Since HTTP calls should never be used in a test, actions require extreme
171 - Refactoring does not break test unless contract changes
180 - If there is logic used for creating `RouteLink` items, we should unit test
188 - [Vue Test Utils](https://vue-test-utils.vuejs.org/)
189 - [Knowing What To Test — Vue Component Unit Testing](https://vuejsdevelopers.com/2019/08/26/vue-wh…
190 - [How to unit test a vuex Store](https://www.dev-tips-and-tricks.com/how-to-unit-test-a-vuex-store)