LaTeX-Workshop/test
2022-04-19 15:48:31 +09:00
..
config Move files to test/config 2022-04-06 08:16:18 +09:00
fixtures Rename to fixture010_synctex 2022-04-06 10:56:36 +09:00
unittests Use EventBus for CI tests 2022-04-16 16:08:18 +09:00
utils Wait pdfviewerstatuschanged 2022-04-19 15:48:31 +09:00
build.index.ts enable esModuleInterop in tsconfig.json, which is necessary to compile with the jimp package. 2020-05-02 19:22:34 +09:00
build.test.ts Use EventBus for CI tests 2022-04-16 16:08:18 +09:00
completion.index.ts enable esModuleInterop in tsconfig.json, which is necessary to compile with the jimp package. 2020-05-02 19:22:34 +09:00
completion.test.ts Rename to ciutils.ts 2022-04-06 08:23:09 +09:00
multiroot-ws.index.ts Add test framework for multi-root workspaces 2022-03-02 08:34:49 +01:00
multiroot-ws.test.ts Use EventBus for CI tests 2022-04-16 16:08:18 +09:00
README.md Edit test/README.md [skip ci] 2022-04-06 15:07:38 +09:00
rootfile.index.ts Add rootfile detection tests 2021-02-26 16:59:10 +01:00
rootfile.test.ts Use EventBus for CI tests 2022-04-16 16:08:18 +09:00
runTest.ts Use EventBus for CI tests 2022-04-16 16:08:18 +09:00
unittest.index.ts mkdir test/unittests 2022-04-02 11:42:31 +09:00
viewer.index.ts enable esModuleInterop in tsconfig.json, which is necessary to compile with the jimp package. 2020-05-02 19:22:34 +09:00
viewer.test.ts Wait pdfviewerstatuschanged 2022-04-19 15:48:31 +09:00

Overview

Executing tests

We start a new VS Code instance for each fixture directory in fixtures/*/, which includes a TeX file for tests, and execute an appropriate test defined in *.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

  1. runTest.ts starts a new VS Code instance for each fixture directory and executes *.index.ts.
  2. *.index.ts runs all the tests defined in *.test.ts.
  3. Tests in *.test.ts are executed through runTestWithFixture.
  4. runTestWithFixture skip tests in *.test.ts if they are not related to the current fixture directory.

Unit tests

Unit tests are under the unittests directory.

Executing Tests on GitHub Actions

Read .github/workflows to see how tests are executed on GitHub Actions.