LaTeX-Workshop/test
2022-12-08 10:26:22 +08:00
..
config Move files to test/config 2022-04-06 08:16:18 +09:00
fixtures Fix \input arg does not take underscore filename 2022-07-29 14:15:16 +08:00
unittests Fix an erranous math preview test, add one more 2022-12-08 10:26:22 +08:00
utils Clarify with type annotations that Extension is a kind of service locator 2022-07-23 22:24:54 +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 Re-export sleep from test/utils/ciutils.ts 2022-05-13 08:47:04 +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 Skip a test on macOS 2022-08-31 13:47:56 +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 Skip a CI test on Windows 2022-05-28 09:28:47 +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 Re-export sleep from test/utils/ciutils.ts 2022-05-13 08:47:04 +09:00
runTest.ts Use VS Code 1.71.0 for tests 2022-09-07 10:01:34 +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 Re-export sleep from test/utils/ciutils.ts 2022-05-13 08:47:04 +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.