In the .js(x) or .ts(x) file, push Ctrl + Alt + T.
Teleport to the test file according to the following rules.
Explorer the test file in the same folder.
e.g. src/foo/bar.ts teleports to src/foo/bar.test.ts.
Explorer the test (or same name) file in the test folder.
The folders have the same directory structure from the root of source.
e.g. src/foo/bar.ts teleports to __test__/foo/bar.test.ts, src/__tests__/foo/bar.test.ts or src/foo/__tests__/bar.test.ts. If there is more than one, it will be created in the closest folder.
If a test file was opened, do the reverse.
If the test file does not exist, a new test file can be created.
Currently, the suffix of the test file is always added to the end of the file name (default: .test).
Storybook
In the .jsx or tsx file, push Ctrl + Alt + S.
The rules of teleport are exactly the same as in the test, differing only in filename suffixes and directories to be searched.
Config
name
type
descriptions
default
sourceRoot
string
Root directory of source.
"src"
testSourceRoots
array of string
Root directories of tests. Files under configured directories are considered tests.