mirror of
https://github.com/zrwusa/data-structure-typed.git
synced 2024-11-23 04:44:04 +00:00
test: Refine the test cases.
This commit is contained in:
parent
4d88405ac1
commit
61369adbdd
|
@ -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
|
||||
|
||||
|
|
|
@ -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 }]);
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
@ -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" }]);
|
||||
})
|
||||
})
|
Loading…
Reference in a new issue