Skip to content

Commit

Permalink
tests fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gromdimon committed Dec 8, 2023
1 parent 499b7d3 commit 9805850
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 131 deletions.
Empty file.
Empty file.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const seqvarInfoMitochondrial = {
}

describe.concurrent('Freqs', async () => {
it('renders the Freqs info', async () => {
it('renders the Freqs info for Autosonmal Variants', async () => {
const { wrapper } = await setupMountedComponents(
{ component: Freqs, template: false },
{
Expand All @@ -50,7 +50,7 @@ describe.concurrent('Freqs', async () => {
}
}
)
const freqsAutosomal = wrapper.findComponent(VariantDetailsFreqsMitochondrial)
expect(freqsAutosomal.exists()).toBe(true)
const freqsMitochondrial = wrapper.findComponent(VariantDetailsFreqsMitochondrial)
expect(freqsMitochondrial.exists()).toBe(true)
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ import { nextTick } from 'vue'

import * as VariantValidatorInfo from '@/assets/__tests__/BRCA1VariantValidator.json'
import VariantValidator from '@/components/SeqvarDetails/VariantValidatorCard.vue'
import { setupMountedComponents } from '@/lib/test-utils'
import type { Seqvar } from '@/lib/genomicVars'
import { deepCopy, setupMountedComponents } from '@/lib/test-utils'

const smallVariantInfo = {
release: 'grch37',
chromosome: 'chr17',
start: '43044295',
end: '43044295',
reference: 'G',
alternative: 'A',
hgnc_id: 'HGNC:1100'
const seqvarInfo: Seqvar = {
genomeBuild: 'grch37',
chrom: '17',
pos: 43044295,
del: 'G',
ins: 'A',
userRepr: 'grch37-17-43044295-G-A'
}

describe.concurrent('VariantValidator', async () => {
Expand All @@ -25,7 +25,7 @@ describe.concurrent('VariantValidator', async () => {
{ component: VariantValidator, template: false },
{
props: {
smallVariant: smallVariantInfo
seqvar: deepCopy(seqvarInfo)
}
}
)
Expand All @@ -50,7 +50,7 @@ describe.concurrent('VariantValidator', async () => {
{ component: VariantValidator, template: false },
{
props: {
smallVariant: smallVariantInfo
seqvar: deepCopy(seqvarInfo)
}
}
)
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion frontend/src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const separateIt = (value: number, separator: string = ' '): string => {
* @returns whether the position is on the mitochondrial genome
*/
export const isVariantMt = (smallVar: any): boolean => {
return ['MT', 'M', 'chrMT', 'chrM'].includes(smallVar?.chromosome)
return ['MT', 'M', 'chrMT', 'chrM'].includes(smallVar?.chrom)
}

/**
Expand Down

0 comments on commit 9805850

Please sign in to comment.