compiler/packages/babel-plugin-react-compiler/scripts/jest/makeE2EConfig.js JAVASCRIPT 35 lines View on github.com → Search inside
1/**2 * Copyright (c) Meta Platforms, Inc. and affiliates.3 *4 * This source code is licensed under the MIT license found in the5 * LICENSE file in the root directory of this source tree.6 */78module.exports = function makeE2EConfig(displayName, useForget) {9  return {10    displayName,11    testEnvironment: 'jsdom',12    rootDir: '../../src',13    testMatch: ['**/*.e2e.(js|tsx)'],14    modulePathIgnorePatterns: [15      // ignore snapshots from the opposite forget configuration16      useForget ? '.*\\.no-forget\\.snap$' : '.*\\.with-forget\\.snap$',17      // ignore snapshots from the main project18      '.*\\.ts\\.snap$',19    ],20    globals: {21      __FORGET__: useForget,22    },23    snapshotResolver: useForget24      ? '<rootDir>/../scripts/jest/snapshot-resolver-with-forget.js'25      : '<rootDir>/../scripts/jest/snapshot-resolver-no-forget.js',2627    transform: {28      '\\.[tj]sx?$': useForget29        ? '<rootDir>/../scripts/jest/transform-with-forget'30        : '<rootDir>/../scripts/jest/transform-no-forget',31    },32    transformIgnorePatterns: ['/node_modules/'],33  };34};

Findings

✓ No findings reported for this file.

Get this view in your editor

Same data, no extra tab — call code_get_file + code_get_findings over MCP from Claude/Cursor/Copilot.