belkiss / better-flutter-tests

Visual Studio Code Extension for better coding / testing workflow. - Fork of https://bitbucket.org/ThePeacefulCoder/better-flutter-tests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

README

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 existing xyz.dart file with one click!
  • βœ… Switching between xyz.dart file and the associated xyz_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

Demo

Create test file or switch between tests and code with ⌘+T. Execute Tests with βŒ₯+⌘+T

demo-gif

Keep file and folder structure in sync after rename or move operations

rename-gif

Commands Summary

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

Snippets

Snippet Prefix Description
ftest Creates test('<test-name>', () {<test-code>})
fgroup Creates group('<group-name>', () {<multiple-tests>})

About

Visual Studio Code Extension for better coding / testing workflow. - Fork of https://bitbucket.org/ThePeacefulCoder/better-flutter-tests

License:MIT License


Languages

Language:TypeScript 100.0%