Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
alice-sevin committed Sep 25, 2024
1 parent ecfd2f0 commit 87e16fa
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 8 deletions.
3 changes: 1 addition & 2 deletions ui/stories/StepForm.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ const SAMPLE_VARIABLES = [
];

const VARIABLES = SAMPLE_VARIABLES.reduce((vars, item) => {
// @ts-ignore
vars[item.identifier] = item.value ?? item.identifier;
vars[item.identifier] = 'value' in item ? item.value : item.identifier;
return vars;
}, {} as Record<string, any>);

Expand Down
1 change: 1 addition & 0 deletions ui/tests/unit/aggregation-widget.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { createLocalVue, shallowMount } from '@vue/test-utils';
import { describe, expect, it } from 'vitest';

import AggregationWidget from '@/components/stepforms/widgets/Aggregation.vue';

const localVue = createLocalVue();

describe('Widget AggregationWidget', () => {
Expand Down
2 changes: 1 addition & 1 deletion ui/tests/unit/filter-simple-condition-widget.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Wrapper } from '@vue/test-utils';
import { createLocalVue, mount, shallowMount } from '@vue/test-utils';
import { describe, expect, it, vi } from 'vitest';
import { describe, expect, it } from 'vitest';

import AutocompleteWidget from '@/components/stepforms/widgets/Autocomplete.vue';
import FilterSimpleConditionWidget from '@/components/stepforms/widgets/FilterSimpleCondition.vue';
Expand Down
1 change: 0 additions & 1 deletion ui/tests/unit/select-column-step-form.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ describe('Select Column Step Form', () => {
},
},
});
const store = runner.getStore();
wrapper.setData({ editedStep: { columns: ['columnB'] } });
wrapper.find(MultiselectWidget).trigger('input');
await wrapper.vm.$nextTick();
Expand Down
1 change: 0 additions & 1 deletion ui/tests/unit/trim-step-form.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ describe('Trim Column Step Form', () => {
},
data: { editedStep: { columns: ['columnB'] } },
});
const store = runner.getStore();
wrapper.find(MultiselectWidget).trigger('input');
await wrapper.vm.$nextTick();
expect(wrapper.emitted().setSelectedColumns).toEqual([[{ column: 'columnB' }]]);
Expand Down
1 change: 0 additions & 1 deletion ui/tests/unit/uniquegroups-step-form.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ describe('UniqueGroups Step Form', () => {
propsData: { selectedColumns: [] },
data: { editedStep: { name: 'uniquegroups', on: ['foo'] } },
});
const store = runner.getStore();
wrapper.find(MultiselectWidget).trigger('input');
await wrapper.vm.$nextTick();
expect(wrapper.emitted().setSelectedColumns).toEqual([[{ column: 'foo' }]]);
Expand Down
4 changes: 2 additions & 2 deletions ui/tests/unit/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import { describe, expect, it, test, vi } from 'vitest';
import type { VueConstructor } from 'vue';

import type BaseStepForm from '@/components/stepforms/StepForm.vue';
import StoreStepFormComponent from '@/components/stepforms/StoreStepFormComponent.vue';
import type { Pipeline } from '@/lib/steps';
import type { ValidationError } from '@/lib/translators/base';
import { setupVQBStore, useVQBStore } from '@/store';
import type { VQBState } from '@/store/state';
import { emptyState } from '@/store/state';
import StoreStepFormComponent from '@/components/stepforms/StoreStepFormComponent.vue';

vi.mock('@/components/FAIcon.vue');

Expand Down Expand Up @@ -167,7 +167,7 @@ export class BasicStepFormTestRunner {
}

testValidate(testConfiguration: TestCaseConfiguration, expectedEmit?: object) {
const { testlabel, store, props, data } = testConfiguration;
const { testlabel, props, data } = testConfiguration;
// assume by default that the expected output is the initial input
expectedEmit = expectedEmit ?? props?.initialStepValue;

Expand Down

0 comments on commit 87e16fa

Please sign in to comment.