-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(lapis): expose the lineage definition files used by SILO
resolves #1034
- Loading branch information
1 parent
0f07555
commit 28ea0ff
Showing
9 changed files
with
122 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { expect } from 'chai'; | ||
import { basePath, lapisInfoClient } from './common'; | ||
|
||
describe('The lineageDefinition endpoint', () => { | ||
it('should return the file as JSON', async () => { | ||
const lineageDefinition = await lapisInfoClient.getLineageDefinition({ | ||
column: 'pango_lineage', | ||
}); | ||
|
||
expect(lineageDefinition['A']).to.deep.equal({}); | ||
expect(lineageDefinition['A.1']).to.deep.equal({ parents: ['A'] }); | ||
expect(lineageDefinition['AT.1']).to.deep.equal({ | ||
aliases: ['B.1.1.370.1'], | ||
parents: ['B.1.1.370'], | ||
}); | ||
}); | ||
|
||
it('should return the file as YAML', async () => { | ||
const result = await fetch(basePath + '/sample/lineageDefinition/pango_lineage'); | ||
const lineageDefinitionYaml = await result.text(); | ||
|
||
const expectedFileStart = `A: {} | ||
A.1: | ||
parents: | ||
- A | ||
A.11: | ||
parents: | ||
- A`; | ||
|
||
expect(lineageDefinitionYaml).to.match(new RegExp(`^${expectedFileStart}`)); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters