Skip to content

Commit 5ecef00

Browse files
committed
fix: hose options for getCanonizedHoseCodesForPath were not taken into account
1 parent f8194a1 commit 5ecef00

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

src/topic/__tests__/getCanonizedHoseCodesForPaths.test.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,15 @@ test('methane', () => {
4747
paths: [],
4848
}); // carbon has no links
4949
expect(result3[1].paths.map((p) => p.pathLength)).toStrictEqual([2, 2, 2]); // one of the hydrogens
50+
51+
const result4 = getCanonizedHoseCodesForPath(topicMolecule, {
52+
fromAtomicNo: 1,
53+
toAtomicNo: 1,
54+
minPathLength: 2,
55+
maxSphereSize: 2,
56+
});
57+
58+
expect(result4[1].paths[0].hoses).toHaveLength(3);
5059
});
5160

5261
test('ethyl vinyl ether', () => {

src/topic/getCanonizedHoseCodesForPaths.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ export function getCanonizedHoseCodesForPath(
8585
pathLength: path.pathLength,
8686
path: path.path,
8787
hoses: getHoseCodesForAtomsAsStrings(topicMolecule.moleculeWithH, {
88+
...options,
8889
rootAtoms: path.path,
8990
tagAtoms: [fromAtom, toAtom],
9091
}),

0 commit comments

Comments
 (0)