Skip to content

Commit

Permalink
adding an additional test
Browse files Browse the repository at this point in the history
  • Loading branch information
tnrich committed Nov 10, 2022
1 parent 0270aa7 commit 9564225
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/featureTypesAndColors.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const {
getFeatureTypes,
getFeatureToColorMap,
getMergedFeatureMap,
getGenbankFeatureToColorMap
Expand All @@ -8,6 +9,18 @@ describe("getFeatureToColorMap", function() {
it("should pass back feature colors by default ", function() {
expect(getFeatureToColorMap().proprotein).toEqual("#F39A9D");
});
it("getFeatureTypes should not show hidden types by default ", function() {
global.tg_featureTypeOverrides = [
{ name: "proprotein", isHidden: true },
{ name: "CDS", color: "blue" },
{ name: "someRandomFeature", color: "red", genbankEquivalentType: "RBS" }
];
expect(getFeatureTypes().includes("proprotein")).toEqual(false);
expect(getFeatureTypes().includes("CDS")).toEqual(true);
expect(
getFeatureTypes({ includeHidden: true }).includes("proprotein")
).toEqual(true);
});

it("should allow overwriting of colors ", function() {
global.tg_featureTypeOverrides = [
Expand Down

0 comments on commit 9564225

Please sign in to comment.