Skip to content

Commit

Permalink
speedup tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gromdimon committed Sep 6, 2023
1 parent e937abf commit 2337cc3
Show file tree
Hide file tree
Showing 30 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion frontend/src/api/__tests__/annonars.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import * as EMPSearchInfo from '@/assets/__tests__/EMPSearchInfo.json'

const fetchMocker = createFetchMock(vi)

describe('Annonars Client', () => {
describe.concurrent('Annonars Client', () => {
beforeEach(() => {
fetchMocker.enableMocks()
fetchMocker.resetMocks()
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/api/__tests__/common.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { describe, it, expect } from 'vitest'

import { API_BASE_PREFIX, API_BASE_PREFIX_ANNONARS, API_BASE_PREFIX_MEHARI } from '../common'

describe('API_BASE_PREFIX constants', () => {
describe.concurrent('API_BASE_PREFIX constants', () => {
it('returns the correct API base prefix in production mode', () => {
const originalMode = import.meta.env.MODE
expect(API_BASE_PREFIX).toBe('/')
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/api/__tests__/mehari.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as BRCA1TxInfo from '@/assets/__tests__/BRCA1TxInfo.json'

const fetchMocker = createFetchMock(vi)

describe('Mehari Client', () => {
describe.concurrent('Mehari Client', () => {
beforeEach(() => {
fetchMocker.enableMocks()
fetchMocker.resetMocks()
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/api/__tests__/misc.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { MiscClient } from '../misc'

const fetchMocker = createFetchMock(vi)

describe('Misc Client', () => {
describe.concurrent('Misc Client', () => {
beforeEach(() => {
fetchMocker.enableMocks()
fetchMocker.resetMocks()
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/api/__tests__/utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
infoFromQuery
} from '../utils'

describe('roundIt method', () => {
describe.concurrent('roundIt method', () => {
it('should round a positive value with default digits', () => {
const result = roundIt(3.14159)
expect(result).toBe('<abbr title="3.14159">3.14</abbr>')
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/__tests__/BeaconNetwork.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const makeWrapper = () => {
})
}

describe('BeaconNetwork', async () => {
describe.concurrent('BeaconNetwork', async () => {
it('renders the BeaconNetwork info', async () => {
const wrapper = makeWrapper()
expect(wrapper.text()).toContain('Query Beacon -----|>')
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/__tests__/ClinVar.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const makeWrapper = (cvInfo: Object) => {
})
}

describe('ClinVar', async () => {
describe.concurrent('ClinVar', async () => {
it('renders the ClinVar info', async () => {
const wrapper = makeWrapper(clinVarInfo)
expect(wrapper.text()).toContain('Note that REEV is using a local copy of Clinvar')
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/__tests__/FooterDefault.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const makeWrapper = () => {
)
}

describe('FooterDefault.vue', () => {
describe.concurrent('FooterDefault.vue', () => {
it('renders information', () => {
const wrapper = makeWrapper()
const footer = wrapper.find('footer')
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/__tests__/FreqsAutosomal.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const makeWrapper = (variantData: Object) => {
})
}

describe('FreqsAutosomal', async () => {
describe.concurrent('FreqsAutosomal', async () => {
it('renders the FreqsAutosomal info', async () => {
const wrapper = makeWrapper(BRCA1VariantInfo['result'])
expect(wrapper.text()).toContain('gnomAD Genomes')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const makeWrapper = () => {
})
}

describe('FreqsMitochondrial', async () => {
describe.concurrent('FreqsMitochondrial', async () => {
it('renders the FreqsMitochondrial info', async () => {
const wrapper = makeWrapper()
expect(wrapper.html()).toContain('HelixMTdb')
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/__tests__/HeaderDefault.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const makeWrapper = () => {
)
}

describe('HeaderDefault.vue', () => {
describe.concurrent('HeaderDefault.vue', () => {
it('renders the logo and title', () => {
const wrapper = makeWrapper()

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/__tests__/HeaderDetailPage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const geneData = {
}
}

describe('HeaderDetailPage', async () => {
describe.concurrent('HeaderDetailPage', async () => {
it('renders the gene symbol and nav links', () => {
const wrapper = makeWrapper()

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/__tests__/ScoreDisplay.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const makeWrapper = () => {
})
}

describe('ScoreDisplay', async () => {
describe.concurrent('ScoreDisplay', async () => {
it('renders the ScoreDisplay with default props', async () => {
const wrapper = makeWrapper()
const svg = wrapper.find('svg')
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/__tests__/SearchBar.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const makeWrapper = () => {
})
}

describe('SearchBar.vue', () => {
describe.concurrent('SearchBar.vue', () => {
it('renders the search bar with the correct default props', () => {
const wrapper = makeWrapper()

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/__tests__/TxCsq.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const makeWrapper = () => {
})
}

describe('TxCsq', async () => {
describe.concurrent('TxCsq', async () => {
it('renders the TxCsq info', async () => {
const wrapper = makeWrapper()
const table = wrapper.find('table')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const makeWrapper = () => {
})
}

describe('VariantConservation', async () => {
describe.concurrent('VariantConservation', async () => {
it('renders the VariantConservation info', async () => {
const wrapper = makeWrapper()
expect(wrapper.text()).toContain('The following shows UCSC 100 vertebrate conservation.')
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/__tests__/VariantFreqs.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const makeWrapper = () => {
})
}

describe('VariantFreqs', async () => {
describe.concurrent('VariantFreqs', async () => {
it('renders the VariantFreqs info', async () => {
const wrapper = makeWrapper()
const freqsAutosomal = wrapper.findComponent(VariantDetailsFreqsAutosomal)
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/__tests__/VariantGene.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const makeWrapper = () => {
})
}

describe('VariantGene', async () => {
describe.concurrent('VariantGene', async () => {
it('renders the VariantGene info', async () => {
const wrapper = makeWrapper()
expect(wrapper.text()).toContain('HGNC')
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/__tests__/VariantTools.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const makeWrapper = () => {
})
}

describe('VariantTools', async () => {
describe.concurrent('VariantTools', async () => {
it('renders the VariantTools info', async () => {
const wrapper = makeWrapper()
expect(wrapper.text()).toContain('External Resources')
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/__tests__/VariantValidator.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ global.fetch = vi.fn((): any =>
Promise.resolve({ json: () => Promise.resolve(VariantValidatorInfo) })
)

describe('VariantValidator', async () => {
describe.concurrent('VariantValidator', async () => {
it('renders the VariantValidator info', async () => {
const wrapper = makeWrapper()
expect(wrapper.text()).toContain('to submit the variant to VariantValidator.org.')
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/stores/__tests__/geneInfo.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { useGeneInfoStore } from '../geneInfo'

const fetchMocker = createFetchMock(vi)

describe('geneInfo Store', () => {
describe.concurrent('geneInfo Store', () => {
beforeEach(() => {
setActivePinia(createPinia())
fetchMocker.enableMocks()
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/stores/__tests__/genesList.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const exampleGenesList = {
]
}

describe('geneInfo Store', () => {
describe.concurrent('geneInfo Store', () => {
beforeEach(() => {
setActivePinia(createPinia())
fetchMocker.enableMocks()
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/stores/__tests__/misc.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { StoreState, useMiscStore } from '../misc'

const fetchMocker = createFetchMock(vi)

describe('miscInfo Store', () => {
describe.concurrent('miscInfo Store', () => {
beforeEach(() => {
setActivePinia(createPinia())
fetchMocker.enableMocks()
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/stores/__tests__/variantInfo.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const smallVariantInfo = {
hgnc_id: 'HGNC:1100'
}

describe('geneInfo Store', () => {
describe.concurrent('geneInfo Store', () => {
beforeEach(() => {
setActivePinia(createPinia())
fetchMocker.enableMocks()
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/__tests__/AboutView.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const makeWrapper = () => {
}
)
}
describe('AboutView', async () => {
describe.concurrent('AboutView', async () => {
it('renders the header', () => {
const wrapper = makeWrapper()

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/__tests__/ContactView.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const makeWrapper = () => {
)
}

describe('ContactView', async () => {
describe.concurrent('ContactView', async () => {
it('renders the header', () => {
const wrapper = makeWrapper()

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/__tests__/GeneDetailView.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const makeWrapper = () => {
)
}

describe('GeneDetailView', async () => {
describe.concurrent('GeneDetailView', async () => {
it('renders the header', async () => {
const wrapper = makeWrapper()

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/__tests__/GenesListView.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const makeWrapper = () => {
)
}

describe('GenesListView', async () => {
describe.concurrent('GenesListView', async () => {
it('renders the header, footer and searchBar', async () => {
const wrapper = makeWrapper()

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/__tests__/HomeView.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const router = createRouter({
// Mock router push
router.push = vi.fn()

describe('HomeView with mocked router', async () => {
describe.concurrent('HomeView with mocked router', async () => {
it('renders the header and the footer', () => {
const wrapper = makeWrapper(router)
const header = wrapper.findComponent(HeaderDefault)
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/__tests__/VariantDetailView.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const makeWrapper = () => {
)
}

describe('VariantDetailView', async () => {
describe.concurrent('VariantDetailView', async () => {
it('renders the header', async () => {
const wrapper = makeWrapper()

Expand Down

0 comments on commit 2337cc3

Please sign in to comment.