fix TS errors when checking unit tests
(it was loading the setup files, then following the imports into "built" directory. as those are compiled JS, it produced lots of type errors.)
This commit is contained in:
parent
a777b2357b
commit
d6071853ca
5 changed files with 3 additions and 2 deletions
16
packages/backend/test/jest.setup.unit.mjs
Normal file
16
packages/backend/test/jest.setup.unit.mjs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: hazelnoot and other Sharkey contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
// Need to reference the built file
|
||||
import { prepEnv } from '../built/boot/prepEnv.js';
|
||||
|
||||
/**
|
||||
* Applies the Sharkey environment details into the test environment.
|
||||
* https://jestjs.io/docs/configuration#globalsetup-string
|
||||
*/
|
||||
export default function setup() {
|
||||
// Make sure tests run in the Sharkey environment.
|
||||
prepEnv();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue