From 5e6b0ffb777c9469328511739753fce11aad9236 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Sun, 22 Dec 2024 00:03:57 +0100 Subject: [PATCH] Try again --- noxfile.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/noxfile.py b/noxfile.py index e3324a31..f646a655 100644 --- a/noxfile.py +++ b/noxfile.py @@ -3,6 +3,8 @@ import nox from nox.sessions import Session +PROJECT_ROOT = Path(__file__).parent + @nox.session(python=["3.10", "3.11", "3.12", "3.13"]) def tests(session: Session) -> None: @@ -43,8 +45,18 @@ def test_typedoc(session: Session, typedoc: str) -> None: session.run("npx", "tsc", "--version", external=True) session.run("npx", "typedoc", "--version", external=True) # Run typescript tests - test_file = (Path(__file__).parent / "tests/test.ts").resolve() - session.run("npx", "--import", "tsx", "--test", test_file, external=True) + test_file = (PROJECT_ROOT / "tests/test.ts").resolve() + register_import_hook = PROJECT_ROOT / "sphinx_js/js/registerImportHook.mjs" + session.run( + "npx", + "--import", + register_import_hook, + "--import", + "tsx", + "--test", + test_file, + external=True, + ) # Run Python tests session.run("pytest", "--junitxml=test-results.xml", "-k", "not js")