function createStylesFixture({
  // Used to set the import statement
  importText: _importText,
  // Used to set the importSource for the transform
  importSource: _importSource,
  // The importMap is used to check that renamed exports works
  importMap: _importMap,
} = {}) {
  const importText = _importText || defaultImportText;
  const importSource = _importSource || defaultImportSource;
  const importMap = _importMap || defaultImportMap;

  const {
    create,
    createTheme,
    defineConsts,
    defineVars,
    firstThatWorks,
    keyframes,
    positionTry,
    props,
    viewTransitionClass,
  } = importMap;

  const from = importSource?.from || importSource;

  // Generate the defineConsts and defineVars output first.
  // This is inlined into the fixture so that createTheme works.
  const defineConstsAndVarsOutput = transform(
    `
    import ${importText} from '${from}';
    export const constants = ${defineConsts}({
      mediaQuery: '@media (min-width: 768px)',
    });
    export const vars = ${defineVars}({
      bar: 'left'
    });
  `,
    {
      filename: '/stylex/packages/vars.stylex.js',
      importSources: [importSource],
    },
  ).code;

  return `
    ${defineConstsAndVarsOutput}
    const viewTransition1 = ${viewTransitionClass}({
      group: {
        transitionProperty: 'none',
      },
      imagePair: {
        borderRadius: 16,
      },
      old: {
        animationDuration: '0.5s',
      },
      new: {
        animationTimingFunction: 'ease-out',
      },
    });
    const fallback1 = ${positionTry}({
      anchorName: '--myAnchor',
      positionArea: 'top left',
    });
    const fallback2 = ${positionTry}({
      anchorName: '--otherAnchor',
      top: 'anchor(bottom)',
      insetInlineStart: 'anchor(start)',
    });
    const styles = ${create}({
      root: {
        animationName: ${keyframes}({
          from: {
            backgroundColor: 'yellow'
          },
          to: {
            backgroundColor: 'orange'
          },
        }),
        positionTryFallbacks: \`\${fallback1}, \${fallback2}\`,
        color: {
          default: 'red',
          [constants.mediaQuery]: 'blue'
        },
        position: ${firstThatWorks}('sticky', 'fixed')
      }
    });

    const theme = ${createTheme}(vars, {
      bar: 'green'
    });

    ${props}(styles.root, theme);
  `;
}
Fixture factory

This is used to create a consistent fixture across all the tests for
different ways of importing StyleX. The fixture uses all of the
StyleX exports to make sure they are transformed as expected.