Add ts-auto-mock and ts-node and transformer for better mocks.

This commit is contained in:
gnuxie committed 2024-09-09 13:27:41 +01:00
1 parent ecac66e8c6
commit 701f5da47f
3 files changed
+139 -3

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
// SPDX-FileCopyrightText: 2024 Gnuxie <Gnuxie@protonmail.com>
//
// SPDX-License-Identifier: CC0-1.0
const tsAutoMockTransformer = require("ts-auto-mock/transformer").default;
require("ts-node").register({
project: "./tsconfig.json",
transformers: (program) => ({
before: [tsAutoMockTransformer(program)],
}),
});