import { join } from 'path'; import { runBenchmark } from '@compiled/benchmark'; import { transform as transformCode } from '../test-utils'; const code = ` import '@compiled/react'; import { colorMixin } from '../__fixtures__/mixins/objects'; import { secondary } from '../__fixtures__/mixins/simple';
`; const transform = (options = {}) => transformCode(code, { cache: false, filename: join(__dirname, 'module-traversal-cache.js'), ...options, }); describe('module traversal cache benchmark', () => { it('transforms the code correctly', () => { expect(transform()).toMatchInlineSnapshot(` "const _4 = \\"._19ith012{border:3px solid pink}\\"; const _3 = \\"._bfhk32ev{background-color:pink}\\"; const _2 = \\"._syaz5scu{color:red}\\"; const _ = \\"._1wybo7ao{font-size:15px}\\";