Improve the quality of your code by accelerating your coding/testing workflow π
Boost your TDD-Workflow by:
- β
Creating a proper
xyz_test.dart
file with boilderplate code for an existingxyz.dart
file with one click! - β
Switching between
xyz.dart
file and the associatedxyz_test.dart
file instantly - β Dramatically faster test execution -> Run only the unit tests that affect the file you're currently working on.
- β Using snippets to avoid writing boilderplate code
- β Automatically keep file and folder structure in sync between /lib and /test even if you rename or move a file or folder
Create test file or switch between tests and code with β+T. Execute Tests with β₯+β+T
Keep file and folder structure in sync after rename or move operations
Command ( + context menu) | Shortcut | Description |
---|---|---|
Better Tests: Go to tests | β+T | Creates file xyz_test.dart for file xyz.dart in the /test folder. Will automatically create the necessary folder tree under /test to match the location of xyz.dart under /lib .If xyz_test.dart already exists, editor will show it. |
Better Tests: Go to source file | β+T | Opens the xyz.dart file if you are inside a xyz_test.dart file. |
Better Tests: Run tests for file | β₯+β+T | Executes all tests inside of a xyz_test.dart . Works also if you are currently inside of xyz.dart |
Snippet Prefix | Description |
---|---|
ftest |
Creates test('<test-name>', () {<test-code>}) |
fgroup |
Creates group('<group-name>', () {<multiple-tests>}) |