Pair your source/test files from test/source files.
- Switch to test files from source files.
- Switch to source files from test files.
- Default supported file extensions:
PHP
Foo.php <=> FooTest.hppPython
foo.py <=> test_foo.pyJava
Foo.java <=> FooTest.javaKotlin
Foo.kt <=> FooTest.ktGroovy
Foo.groovy <=> FooTest.groovy, FooSpec.groovyJavaScript
foo.js <=> foo.test.js, foo.spec.js, foo.test.ts, foo.spec.tsTypeScript
foo.ts <=> foo.test.ts, foo.spec.tsVue.js
foo.vue <=> foo.test.js, foo.spec.js, foo.test.ts, foo.spec.tsReact
foo.jsx <=> foo.test.js, foo.spec.js, foo.test.ts, foo.spec.tsRuby
foo.rb <=> foo_test.rb, foo_spec.rbGo
foo.go <=> foo_test.goSwift
Foo.swift <=> FooTests.swiftMatlab
Foo.m <=> FooTest.mR
foo.r <=> test_foo.r
View
>Command Palette
, ChooseTestPair: Pair the Source/Test file
.- Or
Ctrl
+Shift
+P
{
"testPair.testFileExtensions": [
{
// the file extension.
"extension": "js",
// the glob pattern for test filenames, @@ as source filename.
// it will match filenames end with @@.spec.js or @@.test.js.
"testGlob": "@@{.spec,.test}.js",
// the glob pattern for source filenames, @@ as source filename.
// it will remove the test filename parts end with .spec.js or .test.js.
"sourceGlob": "@@{.spec,.test}",
// the glob pattern for source file extensions.
// if ignore it, the default is current file extension.
// it will match filename with the extension @@.js, @@.vue, @@.jsx
"sourceExt": "{js,vue,jsx}"
}
]
}