mirror of
https://gitee.com/antv/g6.git
synced 2024-12-04 04:38:55 +08:00
f9b845a9da
* chore: add radial layout demo * fix: conversation * feat: update snapshots * fix: ci
21 lines
431 B
JavaScript
21 lines
431 B
JavaScript
const testTemplate = ({ config, filename, dataFile }) => {
|
|
return `import { Graph } from '@/src';
|
|
import data from '@@/dataset/${dataFile}';
|
|
import type { STDTestCase } from '../types';
|
|
|
|
export const ${filename}: STDTestCase = async (context) => {
|
|
const graph = new Graph({
|
|
...context,
|
|
data,
|
|
${config}
|
|
});
|
|
|
|
await graph.render();
|
|
|
|
return graph;
|
|
};
|
|
`;
|
|
};
|
|
|
|
module.exports = testTemplate;
|