Skip to content

Commit

Permalink
test: add one more test of makeRacemic
Browse files Browse the repository at this point in the history
  • Loading branch information
lpatiny committed May 28, 2024
1 parent d9e4243 commit bc685a7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/util/__tests__/makeRacemic.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,20 @@ describe('makeRacemic', () => {
makeRacemic(molecule);
expect(molecule.getIDCode()).toBe('gGPDADFHRYjjThQ@@');
});

it('2 enantiomers', () => {
const moleculeR = OCL.Molecule.fromSmiles('C[C@H](Cl)Br');
const idCodeR = moleculeR.getIDCode();
const moleculeS = OCL.Molecule.fromSmiles('C[C@@H](Cl)Br');
const idCodeS = moleculeS.getIDCode();

makeRacemic(moleculeR);
const idCodeRacemic = moleculeR.getIDCode();
makeRacemic(moleculeS)
const idCodeSRacemic = moleculeS.getIDCode();
expect(idCodeR).not.toBe(idCodeS);
expect(idCodeSRacemic).toBe(idCodeRacemic);


})
});

0 comments on commit bc685a7

Please sign in to comment.