Skip to content

pyroscope-io/flamegraph-renderer-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flamegraph-renderer-example

Testing

There are a couple ways of testing the FlamegraphRenderer component:

1. mocking the entire component

See ./src/App.mock.spec.jsx

2. Supporting canvas

In this method you actually render the entire tree.

For that you need to:

  1. Install canvas
  2. Install jest-canvas-mock
  3. Add jest-canvas-mock to your jest setup (./src/setupTests.js)
  4. Update your jest config to not reset mocks (./jest.config.ts)

An example test is available at ./src/App.spec.jsx

Running

yarn
yarn start

Output

image

About

Pyroscope Flamegraph Render Example

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages