Skip to content

Commit

Permalink
fix: update the position of lineXY with arrow (#6442)
Browse files Browse the repository at this point in the history
* fix: update the  position of lineXY with arrow

* fix: update the  position of lineXY with arrow

* fix: add unit test

* fix: add unit test
  • Loading branch information
interstellarmt authored Sep 2, 2024
1 parent 8186255 commit 3d426cc
Show file tree
Hide file tree
Showing 6 changed files with 655 additions and 2 deletions.
20 changes: 20 additions & 0 deletions __tests__/integration/issue-6396.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { issue6396 as render } from '../plots/bugfix/issue-6396';
import { createNodeGCanvas } from './utils/createNodeGCanvas';
import { sleep } from './utils/sleep';
import './utils/useSnapshotMatchers';

describe('issue6396', () => {
const canvas = createNodeGCanvas(800, 500);

it('issue6396.render() should render expected lineXY with arrow', async () => {
const { finished } = render({ canvas });
await finished;
await sleep(20);
const dir = `${__dirname}/snapshots/bugfix`;
await expect(canvas).toMatchDOMSnapshot(dir, render.name);
});

afterAll(() => {
canvas?.destroy();
});
});
Loading

0 comments on commit 3d426cc

Please sign in to comment.