Skip to content

Commit

Permalink
fix: fix ci failed (#5240)
Browse files Browse the repository at this point in the history
* fix: fix prettier issues

* test: update integration test snapshots
  • Loading branch information
Aarebecca authored Dec 8, 2023
1 parent 7d3f191 commit 0961ba7
Show file tree
Hide file tree
Showing 13 changed files with 91 additions and 36 deletions.
3 changes: 2 additions & 1 deletion packages/g6/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"fix": "eslint ./src ./tests --fix && prettier ./src ./tests --write ",
"test": "jest",
"test:integration": "node --expose-gc --max-old-space-size=4096 --unhandled-rejections=strict node_modules/jest/bin/jest tests/integration/ --config jest.node.config.js --coverage --logHeapUsage --detectOpenHandles",
"test:integration_one": "node --expose-gc --max-old-space-size=4096 --unhandled-rejections=strict node_modules/jest/bin/jest tests/integration/animations --config jest.node.config.js --logHeapUsage --detectOpenHandles",
"test:integration_one": "node --expose-gc --max-old-space-size=4096 --unhandled-rejections=strict node_modules/jest/bin/jest tests/integration/behavior --config jest.node.config.js --logHeapUsage --detectOpenHandles",
"test-live": "DEBUG_MODE=1 jest --watch ./tests/unit/item-animate-spec.ts",
"test-behavior": "DEBUG_MODE=1 jest --watch ./tests/unit/item-3d-spec.ts",
"ci": "run-s lint build test:integration",
Expand Down Expand Up @@ -99,6 +99,7 @@
"rollup-plugin-polyfill-node": "^0.8.0",
"rollup-plugin-typescript": "^1.0.1",
"rollup-plugin-visualizer": "^5.6.0",
"stats.js": "^0.17.0",
"ts-jest": "^29.1.1",
"typedoc": "^0.25.0",
"typedoc-plugin-markdown": "^3.16.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/g6/src/stdlib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const {
Snapline,
EdgeFilterLens,
LodController,
EdgeBundling
EdgeBundling,
} = Plugins;

const {
Expand Down Expand Up @@ -306,7 +306,7 @@ const Extensions = {
Snapline,
EdgeFilterLens,
WaterMarker,
EdgeBundling
EdgeBundling,
};

export default registry;
Expand Down
6 changes: 4 additions & 2 deletions packages/g6/src/stdlib/plugin/edgeBundling/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,13 @@ export class EdgeBundling extends Base {
e.data.type = 'polyline-edge';

if (typeof e.data.keyShape === 'object') {
(e.data.keyShape as Record<string, any>).controlPoints = edgePoints[i].slice(1, edgePoints[i].length - 1)
(e.data.keyShape as Record<string, any>).controlPoints = edgePoints[
i
].slice(1, edgePoints[i].length - 1);
} else {
e.data.keyShape = {
controlPoints: edgePoints[i].slice(1, edgePoints[i].length - 1),
}
};
}
});

Expand Down
2 changes: 1 addition & 1 deletion packages/g6/src/stdlib/plugin/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from './edgeBundling'
export * from './edgeBundling';
export * from './fisheye';
export * from './grid';
export * from './history';
Expand Down
2 changes: 1 addition & 1 deletion packages/g6/tests/demo/behaviors/activate-relations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default (context: TestCaseContext) => {
],
},
modes: {
default: [{ type: 'activate-relations', trigger: 'click' }, 'drag-node'],
default: [{ type: 'activate-relations', trigger: 'click' }],
},
});
};
2 changes: 1 addition & 1 deletion packages/g6/tests/demo/plugins/edgeBundling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ export default (context: TestCaseContext, options = {}) => {
fields: ['label'],
formatter: (model) => model.data.label,
},
fill: '#fff'
fill: '#fff',
},
},
plugins: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import scrollCanvas from '../demo/behaviors/scroll-canvas';
import { createContext } from './utils';
import './utils/useSnapshotMatchers';

const dir = `${__dirname}/snapshots/behaivors`;
const dir = `${__dirname}/snapshots/behaviors`;

describe('Scroll canvas behavior', () => {
it('should be rendered correctly', (done) => {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/g6/tests/unit/plugins/edgebundling-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ describe('edge bundling', () => {

function fn() {
edgeBundling.updateBundling({
data: data2
data: data2,
});
}
expect(fn).toThrowError(
Expand Down
92 changes: 74 additions & 18 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0961ba7

Please sign in to comment.