Skip to content

Commit

Permalink
Updated test to work with jest 27
Browse files Browse the repository at this point in the history
  • Loading branch information
rkesters committed Jul 11, 2021
1 parent 9f71608 commit e926cd8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/react-diagrams-routing/tests/PathFinding.test.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { PathFinding } from '../src/engine/PathFinding';

describe('calculating start and end points', function () {
let pathFinding:PathFinding = new PathFinding(null);

beforeEach(() => {
this.pathFinding = new PathFinding(null);
pathFinding = new PathFinding(null);
});

test('return correct object for valid walkable input', () => {
Expand All @@ -23,7 +25,7 @@ describe('calculating start and end points', function () {
[5, 0]
];

const result = this.pathFinding.calculateLinkStartEndCoords(matrix, path);
const result = pathFinding.calculateLinkStartEndCoords(matrix, path);

expect(result.start).toEqual({
x: 2,
Expand Down Expand Up @@ -58,7 +60,7 @@ describe('calculating start and end points', function () {
[3, 0]
];

const result = this.pathFinding.calculateLinkStartEndCoords(matrix, path);
const result = pathFinding.calculateLinkStartEndCoords(matrix, path);

expect(result).toBeUndefined();
});
Expand Down

0 comments on commit e926cd8

Please sign in to comment.