This extension supports that switch the unit test
/ production code
.
- Switch the
unit test
/production code
.- Editor context menu
Go to Test/Code
. - Keyboard Shortcut
CTRL + 9
key. - Invoke
>Go to Test/Code
to the Command Palette(F1).
- Editor context menu
- Customizable suffix rule of
unit test
.
- If you are editing a
foo.js
, When the Command Palette(F1)Go to Test/Code
(or press keyCTRL + 9
on editor), switched tofooSpec.js
.
- suffix rule of
unit test
.
{
// Suffix rule of unit test (case sensitive)
"unittest-switcher.unittest.suffix": [
"Spec",
"-spec",
"_spec",
".spec",
"Test",
"-test",
".test",
"_test"
],
}
- Default switchig rule is...
Switch? | production code | unit test |
---|---|---|
Yes | foo.js | fooSpec.js |
Yes | bar.js | bar-spec.js |
Yes | baz.service.ts | baz.service.spec.ts |
Yes | qux.rb | qux_spec.rb |
Yes | Foo.java | FooTest.java |
Yes | bar.js | bar-test.js |
Yes | baz.ts | baz.test.ts |
No | qux.js | qux.test.ts |
No | foo.js | fooSpec.js.map |
The extension defines a editor keyboard shortcut for the CTRL + 9
key.
It pays tribute to QuickJUnit.
- Added default switching rule '_test'.
- Fix the settings warning 'Incorrect type. Expect one of String'.
- Added default switching rule '.spec'.
- Fix comments.
- Adopted the icon.
- Added default switching rule '_spec'.
- Added suffix settings of unit test.
- Added editor context menu
Go to Test/Code
. - Fix toggle unit test / production code on Windows.
- Release to minimum features.
MIT © 2016 Takashi HOMMA (takas-ho)