File tree Expand file tree Collapse file tree 6 files changed +2462
-3
lines changed
snapshots/bugfix/issue6654 Expand file tree Collapse file tree 6 files changed +2462
-3
lines changed Original file line number Diff line number Diff line change 1+ import { issue6654 as render } from '../plots/bugfix/issue-6654' ;
2+ import { createNodeGCanvas } from './utils/createNodeGCanvas' ;
3+ import { sleep } from './utils/sleep' ;
4+ import './utils/useSnapshotMatchers' ;
5+ import { kebabCase } from './utils/kebabCase' ;
6+
7+ describe ( 'issue6654' , ( ) => {
8+ const canvas = createNodeGCanvas ( 800 , 500 ) ;
9+ const dir = `${ __dirname } /snapshots/bugfix/${ kebabCase ( render . name ) } ` ;
10+
11+ it ( 'issue6654.render() should initial rendering' , async ( ) => {
12+ const { chart } = render ( {
13+ canvas,
14+ container : document . createElement ( 'div' ) ,
15+ } ) ;
16+ await chart . render ( ) ;
17+ await sleep ( 20 ) ;
18+ await expect ( canvas ) . toMatchDOMSnapshot ( dir , 'step0' ) ;
19+ } ) ;
20+
21+ it ( 'issue6654.render() should change color rendering' , async ( ) => {
22+ const { changeColor } = render ( {
23+ canvas,
24+ container : document . createElement ( 'div' ) ,
25+ } ) ;
26+ await changeColor ( ) ;
27+ await sleep ( 20 ) ;
28+ await expect ( canvas ) . toMatchDOMSnapshot ( dir , 'step1' ) ;
29+ } ) ;
30+
31+ afterAll ( ( ) => {
32+ canvas ?. destroy ( ) ;
33+ } ) ;
34+ } ) ;
You can’t perform that action at this time.
0 commit comments