Skip to content

Commit

Permalink
test: Refine the test cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
zrwusa committed Dec 12, 2023
1 parent 4d88405 commit 61369ad
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ All notable changes to this project will be documented in this file.
- [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
- [`auto-changelog`](https://github.com/CookPete/auto-changelog)

## [v1.49.0](https://github.com/zrwusa/data-structure-typed/compare/v1.35.0...main) (upcoming)
## [v1.49.1](https://github.com/zrwusa/data-structure-typed/compare/v1.35.0...main) (upcoming)

### Changes

Expand Down
2 changes: 1 addition & 1 deletion test/unit/data-structures/graph/directed-graph.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ describe('DirectedGraph getCycles', () => {
graph.addEdge('E', 'B');
const cycles = graph.getCycles();
expect(cycles.size).toBe(1);
expect(cycles.get(2)).toEqual( [{"key": "B", "value": undefined}, {"key": "D", "value": undefined}, {"key": "E", "value": undefined}]);
expect(cycles.get(2)).toEqual( [{ "key": "B", "value": undefined }, { "key": "D", "value": undefined }, { "key": "E", "value": undefined }]);
})
})

4 changes: 2 additions & 2 deletions test/unit/data-structures/graph/undirected-graph.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ describe('UndirectedGraph getCycles', () => {
graph.addEdge('E', 'B');
const cycles = graph.getCycles();
expect(cycles.size).toBe(2);
expect(cycles.get(1)).toEqual([{"key": "A", "value": "A"}, {"key": "B", "value": "B"}, {"key": "D", "value": "D"}, {"key": "C", "value": "C"}]);
expect(cycles.get(2)).toEqual([{"key": "B", "value": "B"}, {"key": "D", "value": "D"}, {"key": "E", "value": "E"}]);
expect(cycles.get(1)).toEqual([{ "key": "A", "value": "A" }, { "key": "B", "value": "B" }, { "key": "D", "value": "D" }, { "key": "C", "value": "C" }]);
expect(cycles.get(2)).toEqual([{ "key": "B", "value": "B" }, { "key": "D", "value": "D" }, { "key": "E", "value": "E" }]);
})
})

0 comments on commit 61369ad

Please sign in to comment.