From 52c1e22179c3540416d72317fa310e749f50b9e9 Mon Sep 17 00:00:00 2001
From: lxfu1 <954055752@qq.com>
Date: Fri, 22 Mar 2024 17:40:11 +0800
Subject: [PATCH] fix: test
---
.../snapshots/plugins/tooltip/edge.svg | 3071 +++++++++++++++++
.../snapshots/plugins/tooltip/hover.svg | 3071 +++++++++++++++++
.../snapshots/plugins/tooltip/node.svg | 3071 +++++++++++++++++
.../plugins/tooltip/show-tooltip-by-id.svg | 3071 +++++++++++++++++
.../g6/__tests__/unit/plugins/tooltip.spec.ts | 2 +-
packages/g6/package.json | 2 +-
6 files changed, 12286 insertions(+), 2 deletions(-)
create mode 100644 packages/g6/__tests__/snapshots/plugins/tooltip/edge.svg
create mode 100644 packages/g6/__tests__/snapshots/plugins/tooltip/hover.svg
create mode 100644 packages/g6/__tests__/snapshots/plugins/tooltip/node.svg
create mode 100644 packages/g6/__tests__/snapshots/plugins/tooltip/show-tooltip-by-id.svg
diff --git a/packages/g6/__tests__/snapshots/plugins/tooltip/edge.svg b/packages/g6/__tests__/snapshots/plugins/tooltip/edge.svg
new file mode 100644
index 00000000000..aeb8ff26aa2
--- /dev/null
+++ b/packages/g6/__tests__/snapshots/plugins/tooltip/edge.svg
@@ -0,0 +1,3071 @@
+
\ No newline at end of file
diff --git a/packages/g6/__tests__/snapshots/plugins/tooltip/hover.svg b/packages/g6/__tests__/snapshots/plugins/tooltip/hover.svg
new file mode 100644
index 00000000000..aeb8ff26aa2
--- /dev/null
+++ b/packages/g6/__tests__/snapshots/plugins/tooltip/hover.svg
@@ -0,0 +1,3071 @@
+
\ No newline at end of file
diff --git a/packages/g6/__tests__/snapshots/plugins/tooltip/node.svg b/packages/g6/__tests__/snapshots/plugins/tooltip/node.svg
new file mode 100644
index 00000000000..aeb8ff26aa2
--- /dev/null
+++ b/packages/g6/__tests__/snapshots/plugins/tooltip/node.svg
@@ -0,0 +1,3071 @@
+
\ No newline at end of file
diff --git a/packages/g6/__tests__/snapshots/plugins/tooltip/show-tooltip-by-id.svg b/packages/g6/__tests__/snapshots/plugins/tooltip/show-tooltip-by-id.svg
new file mode 100644
index 00000000000..aeb8ff26aa2
--- /dev/null
+++ b/packages/g6/__tests__/snapshots/plugins/tooltip/show-tooltip-by-id.svg
@@ -0,0 +1,3071 @@
+
\ No newline at end of file
diff --git a/packages/g6/__tests__/unit/plugins/tooltip.spec.ts b/packages/g6/__tests__/unit/plugins/tooltip.spec.ts
index 06cb1b3439c..1340b5701aa 100644
--- a/packages/g6/__tests__/unit/plugins/tooltip.spec.ts
+++ b/packages/g6/__tests__/unit/plugins/tooltip.spec.ts
@@ -18,7 +18,7 @@ describe('plugin tooltip', () => {
it('edge', async () => {
const graph = await createDemoGraph(pluginTooltip);
- graph.emit('edge:click', { targetType: 'egde', target: { id: 'edge-444' } });
+ graph.emit('edge:click', { targetType: 'edge', target: { id: 'edge-444' } });
await expect(graph).toMatchSnapshot(__filename, 'edge');
graph.destroy();
});
diff --git a/packages/g6/package.json b/packages/g6/package.json
index eb1d28a34e4..4e79285203f 100644
--- a/packages/g6/package.json
+++ b/packages/g6/package.json
@@ -44,7 +44,7 @@
"prepublishOnly": "npm run ci",
"size": "limit-size",
"start": "rimraf ./lib && tsc --module commonjs --outDir lib --watch",
- "test": "npm run jest __tests__/unit/plugins/tooltip.spec.ts",
+ "test": "npm run jest __tests__",
"test:integration": "npm run jest __tests__/integration",
"test:unit": "npm run jest __tests__/unit",
"type-check": "tsc --noEmit"