Skip to content

Commit

Permalink
Merge pull request #59 from clockor2/read-tree-bug-#58
Browse files Browse the repository at this point in the history
fix: Read tree bug #58
  • Loading branch information
LeoFeatherstone authored Apr 9, 2024
2 parents 1b952e3 + f2bd8c9 commit 6fdc28b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/io/readers.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,21 @@ import { parseNewickAnnotations, parseHybridLabels } from '../../src/io/readers/
import { readFileSync } from 'fs';
import { beastAnnotation, nhxAnnotation } from '../../src/io/writers/newick';

// test read local files
describe('read', () => {
test('readTreesFromNewick', () => {

const inNewick = readFileSync('test/data/egTree.nwk', 'utf-8');

const tree = readTreesFromNewick(inNewick)[0];

// test the number of leaves
expect(tree.leafList.length).toBe(274);

});
});


describe('parseAnnotations', () => {
test('parseBEASTStyleAnnotations', () => {
var a = '&col=Red,hand={left,right}';
Expand Down

0 comments on commit 6fdc28b

Please sign in to comment.