@nx/gatsby
Version:
Gatsby Plugin for Nx
15 lines • 645 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.updateJestConfig = void 0;
const jest_utils_1 = require("@nx/react/src/utils/jest-utils");
function updateJestConfig(host, options) {
if (options.unitTestRunner !== 'jest') {
return;
}
const configPath = `${options.projectRoot}/jest.config.${options.js ? 'js' : 'ts'}`;
const originalContent = host.read(configPath, 'utf-8');
const content = (0, jest_utils_1.updateJestConfigContent)(originalContent);
host.write(configPath, content);
}
exports.updateJestConfig = updateJestConfig;
//# sourceMappingURL=update-jest-config.js.map