Fix lot of eslint problems

This commit is contained in:
Eric NGUYEN 2022-11-21 13:47:04 +01:00
parent 5b9a0e6b34
commit 8b11c71384
17 changed files with 52 additions and 108 deletions

View file

@ -1,8 +1,8 @@
import * as React from 'react';
import { loadEnv } from 'vite';
import { beforeEach, describe, expect, it } from 'vitest';
import { beforeEach, describe, it } from 'vitest';
import { AppState } from '../../Enums/AppState';
import { FAST_BOOT } from '../../utils/default';
import { fireEvent, render, RenderResult, screen } from '../../utils/test-utils';
import { fireEvent, render, RenderResult } from '../../utils/test-utils';
import { App } from './App';
describe.concurrent('App', () => {
@ -15,7 +15,7 @@ describe.concurrent('App', () => {
});
it('New editor', async() => {
if (FAST_BOOT) {
if (FAST_BOOT !== AppState.MainMenu) {
return;
}
@ -24,7 +24,7 @@ describe.concurrent('App', () => {
}, 10000);
it('Load editor by file', () => {
if (FAST_BOOT) {
if (FAST_BOOT !== AppState.MainMenu) {
return;
}
@ -37,7 +37,7 @@ describe.concurrent('App', () => {
const load2 = app.getByText(/Load a configuration file/i);
fireEvent.click(load2);
const chooseFile = app.getByText(/Import Save/i);
const inputFile: HTMLInputElement = document.querySelector('input[type="file"]') as HTMLInputElement;
app.getByText(/Import Save/i);
document.querySelector('input[type="file"]') as HTMLInputElement;
});
});