mirror of
https://github.com/James-Yu/LaTeX-Workshop.git
synced 2024-10-05 07:37:24 +03:00
.. | ||
fixtures | ||
build.index.ts | ||
build.test.ts | ||
completion.index.ts | ||
completion.test.ts | ||
multiroot-ws.index.ts | ||
multiroot-ws.test.ts | ||
README.md | ||
rootfile.index.ts | ||
rootfile.test.ts | ||
runTest.ts | ||
texlive_linux.profile | ||
texlive_mac.profile | ||
texlive_windows.profile | ||
utils.ts | ||
viewer.index.ts | ||
viewer.test.ts |
Overview
Executing tests
We start a new VS Code instance each fixture
directory in fixtures/build/
and others, which includes a TeX file for tests, and execute an appropriate test defined in build.test.ts
while skipping other tests not related to the directory. For tests of building a LaTeX file, we try to build a LaTeX file in the directory. If a PDF file is not generated, the test fails. With this approach, we can debug the extension by opening a TeX file in the fixture
directory if the test fails.
How tests executed
runTest.ts
starts a new VS Code instance eachfixture
directory and executes*.index.ts
.*.index.ts
runs all the tests defined in*.test.ts
.- Tests in
*.test.ts
are executed throughrunTestWithFixture
. runTestWithFixture
skip tests in*.test.ts
if they are not related to the currentfixture
directory.
Executing Tests on GitHub Actions
Read .github/workflows to see how tests are executed on GitHub Actions.