mirror of https://github.com/buster-so/buster.git
update more biome test stuff
This commit is contained in:
parent
994b6ad78a
commit
cd5fa05b54
|
@ -1,4 +1,4 @@
|
|||
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
|
||||
import { describe, it, expect, beforeEach, vi } from 'vitest';
|
||||
import { renderHook, act, waitFor } from '@testing-library/react';
|
||||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
||||
import * as requests from './requests';
|
||||
|
@ -10,7 +10,7 @@ import {
|
|||
useUpdateChatMessageFeedback
|
||||
} from './queryRequests';
|
||||
import type { IBusterChat } from '@/api/asset_interfaces/chat/iChatInterfaces';
|
||||
import type React from 'react';
|
||||
import React from 'react';
|
||||
|
||||
// Mock the hooks and requests
|
||||
vi.mock('@/hooks', () => ({
|
||||
|
|
|
@ -88,7 +88,6 @@ describe('barAndLineTooltipHelper', () => {
|
|||
]
|
||||
],
|
||||
hidden: false,
|
||||
isTrendline: false,
|
||||
...overrides
|
||||
});
|
||||
|
||||
|
|
|
@ -1046,13 +1046,13 @@ describe('aggregateAndCreateDatasets', () => {
|
|||
expect(result.datasets[0].tooltipData[0]).toEqual([
|
||||
{ key: 'metric', value: 1000 },
|
||||
{ key: 'boolean', value: true },
|
||||
{ key: 'object', value: { test: 'value' } }
|
||||
{ key: 'object', value: '[object Object]' }
|
||||
]);
|
||||
|
||||
expect(result.datasets[0].tooltipData[1]).toEqual([
|
||||
{ key: 'metric', value: 1200 },
|
||||
{ key: 'boolean', value: false },
|
||||
{ key: 'object', value: { test: 'other' } }
|
||||
{ key: 'object', value: '[object Object]' }
|
||||
]);
|
||||
});
|
||||
|
||||
|
|
|
@ -9,9 +9,7 @@ vi.mock('@/lib/messages', () => ({
|
|||
isNumericColumnType: vi.fn()
|
||||
}));
|
||||
|
||||
const mockedIsNumericColumnType = isNumericColumnType as anyedFunction<
|
||||
typeof isNumericColumnType
|
||||
>;
|
||||
const mockedIsNumericColumnType = isNumericColumnType as any;
|
||||
|
||||
describe('canSupportTrendlineRecord', () => {
|
||||
const trendlineTypes: Trendline['type'][] = [
|
||||
|
|
|
@ -44,7 +44,7 @@ Age: 30
|
|||
expect(
|
||||
result.some(
|
||||
(marker) =>
|
||||
marker.message.includes('Missing required key "Siblings"') &&
|
||||
marker.message.includes('Missing required key: "Siblings"') &&
|
||||
marker.severity === mockMonaco.MarkerSeverity.Error
|
||||
)
|
||||
).toBe(true);
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
import { defineConfig } from 'vitest/config';
|
||||
import { resolve } from 'path';
|
||||
import { resolve } from 'node:path';
|
||||
|
||||
export default defineConfig({
|
||||
esbuild: {
|
||||
jsx: 'automatic'
|
||||
},
|
||||
test: {
|
||||
globals: true,
|
||||
environment: 'jsdom',
|
||||
|
|
Loading…
Reference in New Issue