From f4f0f3e18ac77e1bc5df405ec89946b7fd34ee28 Mon Sep 17 00:00:00 2001 From: Phil Darnowsky Date: Mon, 16 Oct 2023 16:51:44 -0400 Subject: [PATCH] Make ESlint happy --- browser/src/DatasetSelector.spec.tsx | 2 +- browser/src/Searchbox.spec.tsx | 2 +- .../src/queries/structural-variant-queries.spec.ts | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/browser/src/DatasetSelector.spec.tsx b/browser/src/DatasetSelector.spec.tsx index 2d1d52ce2..c4c25e103 100644 --- a/browser/src/DatasetSelector.spec.tsx +++ b/browser/src/DatasetSelector.spec.tsx @@ -5,7 +5,7 @@ import React from 'react' import renderer from 'react-test-renderer' import DatasetSelector from './DatasetSelector' -import { forAllDatasets, forDatasetsMatching } from '../../tests/__helpers__/datasets' +import { forAllDatasets } from '../../tests/__helpers__/datasets' import { withDummyRouter } from '../../tests/__helpers__/router' forAllDatasets('DataSelector with "%s" dataset selected', (datasetId) => { diff --git a/browser/src/Searchbox.spec.tsx b/browser/src/Searchbox.spec.tsx index 6df5ea760..c87b07636 100644 --- a/browser/src/Searchbox.spec.tsx +++ b/browser/src/Searchbox.spec.tsx @@ -47,7 +47,7 @@ describe('Searchbox', () => { history.push(`/?dataset=${datasetId}`) const tree = renderer.create(withDummyRouter()) const datasetSelect = tree.root.findByType('select') - const defaultDataset = datasetSelect.props['value'] + const defaultDataset = datasetSelect.props.value expect(defaultDataset).toEqual(expectedDefaultDataset) }) }) diff --git a/graphql-api/src/queries/structural-variant-queries.spec.ts b/graphql-api/src/queries/structural-variant-queries.spec.ts index dc30b16ab..62e0ee5e9 100644 --- a/graphql-api/src/queries/structural-variant-queries.spec.ts +++ b/graphql-api/src/queries/structural-variant-queries.spec.ts @@ -118,8 +118,8 @@ describe('fetchStructuralVariantById', () => { const response = responseWithHits([hit]) const mockClient = makeMockClient(response) const processedResponse = await fetchStructuralVariantById(mockClient, datasetId, variantId) - expect(processedResponse.age_distribution['het']).toEqual('dummy het value') - expect(processedResponse.age_distribution['hom']).toBeNull() + expect(processedResponse.age_distribution.het).toEqual('dummy het value') + expect(processedResponse.age_distribution.hom).toBeNull() }) test('age_distribution translates empty het to null if hom set', async () => { @@ -137,8 +137,8 @@ describe('fetchStructuralVariantById', () => { const response = responseWithHits([hit]) const mockClient = makeMockClient(response) const processedResponse = await fetchStructuralVariantById(mockClient, datasetId, variantId) - expect(processedResponse.age_distribution['het']).toBeNull() - expect(processedResponse.age_distribution['hom']).toEqual('dummy hom value') + expect(processedResponse.age_distribution.het).toBeNull() + expect(processedResponse.age_distribution.hom).toEqual('dummy hom value') }) test('age_distribution is null if neither het nor hom set', async () => { @@ -282,7 +282,7 @@ describe('fetchStructuralVariantsByGene', () => { }, }), consequences: [ - { consequence: 'csq-a', genes: [gene.symbol + 'NOTME'] }, + { consequence: 'csq-a', genes: [`${gene.symbol}NOTME`] }, { consequence: 'csq-b', genes: [gene.symbol] }, { consequence: 'csq-c', genes: [gene.symbol] }, ],