Skip to content

Commit

Permalink
linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
BabyElias committed Aug 11, 2024
1 parent b413eae commit b6c4ee1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 2 additions & 0 deletions docs/pages/usesorting.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<template>

<DocsPageTemplate apiDocs />

</template>
7 changes: 3 additions & 4 deletions lib/__tests__/KTable.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe('KTable.vue', () => {
const headers = [
{ label: 'Name', dataType: 'string' },
{ label: 'Age', dataType: 'numeric' },
{ label: 'City', dataType: 'string'},
{ label: 'City', dataType: 'string' },
];
const items = [
['Alice', 25, 'New York'],
Expand Down Expand Up @@ -93,12 +93,12 @@ describe('KTable.vue', () => {
await wrapper.vm.$nextTick();

const headerCells = wrapper.findAll('thead th');
headerCells.wrappers.forEach((headerCell) => {
headerCells.wrappers.forEach(headerCell => {
expect(headerCell.classes()).toContain('sticky-header');
});

const firstColumnCells = wrapper.findAll('tbody tr td:first-child');
firstColumnCells.wrappers.forEach((cell) => {
firstColumnCells.wrappers.forEach(cell => {
expect(cell.classes()).toContain('sticky-column');
});
});
Expand Down Expand Up @@ -148,5 +148,4 @@ describe('KTable.vue', () => {
// Cleanup: detach the wrapper from the document body after the test
wrapper.destroy();
});

});
8 changes: 4 additions & 4 deletions lib/composables/useSorting/__tests__/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import useSorting, {
DATA_TYPE_STRING,
DATA_TYPE_NUMERIC,
DATA_TYPE_DATE,
DATA_TYPE_OTHERS
DATA_TYPE_OTHERS,
} from '../';

describe('useSorting', () => {
Expand All @@ -17,7 +17,7 @@ describe('useSorting', () => {
{ label: 'Name', dataType: DATA_TYPE_STRING },
{ label: 'Age', dataType: DATA_TYPE_NUMERIC },
{ label: 'Birthdate', dataType: DATA_TYPE_DATE },
{ label: 'Other', dataType: DATA_TYPE_OTHERS }
{ label: 'Other', dataType: DATA_TYPE_OTHERS },
]);

rows = ref([
Expand All @@ -38,9 +38,9 @@ describe('useSorting', () => {

it('should sort rows by string column in ascending order', () => {
const { handleSort, sortedRows } = useSorting(headers, rows, useLocalSorting);

handleSort(0); // Sort by 'Name'

expect(sortedRows.value).toEqual(_.orderBy(rows.value, [row => row[0]], [SORT_ORDER_ASC]));
});

Expand Down

0 comments on commit b6c4ee1

Please sign in to comment.