Skip to content

Commit

Permalink
test: fix broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
erichartline committed Dec 7, 2018
1 parent 501bce9 commit ec7d80f
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/features/Ontology/utils/withLinkGenerator.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ describe("withLinkGenerator", () => {
const fn = withLinkGenerator
describe("with name parameters", () => {
it("returns local URL if given gene name", () => {
expect(fn("Q54QB1", "UniprotKB", "erkB")).toBe("/erkB")
expect(fn("Q54QB1", "UniprotKB", "erkB")).toBe(
"https://testdb.dictybase.org/gene/erkB",
)
})
it("returns local URL if given gene ID", () => {
expect(fn("Q54QB1", "UniprotKB", "DDB_G0272608")).toBe("/DDB_G0272608")
expect(fn("Q54QB1", "UniprotKB", "DDB_G0272608")).toBe(
"https://testdb.dictybase.org/gene/DDB_G0272608",
)
})
it("returns GO URL if given GO name", () => {
expect(fn("0032496", "GO", "response to lipopolysaccharide")).toBe(
Expand All @@ -30,10 +34,14 @@ describe("withLinkGenerator", () => {
)
})
it("returns correct DDB URL", () => {
expect(fn("DDB_G0272608", "DDB")).toBe("/DDB_G0272608")
expect(fn("DDB_G0272608", "DDB")).toBe(
"https://testdb.dictybase.org/gene/DDB_G0272608",
)
})
it("returns correct dictyBase URL", () => {
expect(fn("DDB_G0272608", "dictyBase")).toBe("/DDB_G0272608")
expect(fn("DDB_G0272608", "dictyBase")).toBe(
"https://testdb.dictybase.org/gene/DDB_G0272608",
)
})
it("returns correct FB URL", () => {
expect(fn("test", "FB")).toBe("http://flybase.org/reports/test.html")
Expand Down

0 comments on commit ec7d80f

Please sign in to comment.