github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/packages/pyroscope-flamegraph/src/FlameGraph/uniqueness.spec.ts (about) 1 import fs from 'fs'; 2 import path from 'path'; 3 import { isSameFlamebearer } from './uniqueness'; 4 import { normalize } from './normalize'; 5 6 // Just to make it easier to import "heavy" data 7 const testData = JSON.parse( 8 fs.readFileSync(path.join(__dirname, './testData.json'), 'utf-8') 9 ); 10 const flame = normalize({ profile: testData }); 11 12 describe('uniqueness', () => { 13 it('works', () => { 14 expect(isSameFlamebearer(flame, flame)).toBe(true); 15 }); 16 });