mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 09:22:43 +03:00
1e0fa95493
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8162 GitOrigin-RevId: 7d008762530bb07439a024638fc1221aee677873
31 lines
921 B
TypeScript
31 lines
921 B
TypeScript
/* eslint-disable */
|
|
import { readFileSync } from 'fs';
|
|
|
|
// Reading the SWC compilation config and remove the "exclude"
|
|
// for the test files to be compiled by SWC
|
|
const { exclude: _, ...swcJestConfig } = JSON.parse(
|
|
readFileSync(`${__dirname}/.swcrc`, 'utf-8')
|
|
);
|
|
|
|
// disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves.
|
|
// If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude"
|
|
if (swcJestConfig.swcrc === undefined) {
|
|
swcJestConfig.swcrc = false;
|
|
}
|
|
|
|
export default {
|
|
displayName: 'nx-unplugin-dynamic-asset-loader',
|
|
preset: '../../../jest.preset.js',
|
|
globals: {},
|
|
transform: {
|
|
'^.+\\.[tj]s$': [
|
|
'ts-jest',
|
|
{
|
|
tsconfig: '<rootDir>/tsconfig.spec.json',
|
|
},
|
|
],
|
|
},
|
|
moduleFileExtensions: ['ts', 'js', 'html'],
|
|
coverageDirectory: '../../../coverage/libs/nx/unplugin-dynamic-asset-loader',
|
|
};
|