Remove vitest globals per best practice

This commit is contained in:
rhyse302 2024-02-24 08:56:28 -06:00 committed by Bill Thornton
parent fe2892806c
commit 33efdcda94
12 changed files with 12 additions and 5 deletions

View File

@ -70,7 +70,7 @@ module.exports = {
plugins: [ 'vitest' ],
env: {
node: true,
browser: false,
browser: false
},
extends: [
'plugin:vitest/recommended'

View File

@ -3,6 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import { describe, it, expect } from 'vitest';
import { ItemSortBy } from '../index';

View File

@ -3,6 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import { describe, it, expect } from 'vitest';
import { getAddressCandidates } from '..';

View File

@ -3,6 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import { describe, it, expect } from 'vitest';
import { getAuthorizationHeader } from '..';
import { TEST_CLIENT, TEST_DEVICE } from '../../__helpers__/common';

View File

@ -3,6 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import { describe, it, expect } from 'vitest';
import { getBrowserDeviceProfile } from '..';
import { SubtitleDeliveryMethod } from '../../generated-client';

View File

@ -3,6 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import { describe, it, expect } from 'vitest';
import { isVersionLess } from '..';

View File

@ -3,6 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import { describe, it, expect } from 'vitest';
import { getActivityLogApi, getApiKeyApi, getArtistsApi, getAudioApi, getBrandingApi, getChannelsApi, getClientLogApi, getCollectionApi, getConfigurationApi, getDashboardApi, getDevicesApi, getDisplayPreferencesApi, getDlnaApi, getDlnaServerApi, getDynamicHlsApi, getEnvironmentApi, getFilterApi, getGenresApi, getHlsSegmentApi, getImageApi, getImageByNameApi, getInstantMixApi, getItemLookupApi, getItemRefreshApi, getItemUpdateApi, getItemsApi, getLibraryApi, getLibraryStructureApi, getLiveTvApi, getLocalizationApi, getMediaInfoApi, getMoviesApi, getMusicGenresApi, getNotificationsApi, getPackageApi, getPersonsApi, getPlaylistsApi, getPlaystateApi, getPluginsApi, getQuickConnectApi, getRemoteImageApi, getScheduledTasksApi, getSearchApi, getSessionApi, getStartupApi, getStudiosApi, getSubtitleApi, getSuggestionsApi, getSyncPlayApi, getSystemApi, getTimeSyncApi, getTmdbApi, getTrailersApi, getTvShowsApi, getUniversalAudioApi, getUserApi, getUserLibraryApi, getUserViewsApi, getVideoAttachmentsApi, getVideosApi, getYearsApi } from '..';

View File

@ -3,6 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import { describe, it, expect } from 'vitest';
import { Configuration } from '../../../generated-client/configuration';
import { ImageType } from '../../../generated-client/models/image-type';

View File

@ -3,6 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import { describe, it, expect } from 'vitest';
import normalizeUrl from '../normalize-url';

View File

@ -4,6 +4,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import { describe, it, expect } from 'vitest';
import { getDefaultPort, HTTP_PORT, HTTPS_PORT, HTTPS_PROTOCOL, HTTP_PROTOCOL, copyUrl, parseUrl } from '..';
/**

View File

@ -6,8 +6,7 @@
"moduleResolution": "Node",
"declaration": true,
"noImplicitAny": true,
"outDir": "lib",
"types": ["vitest/globals"]
"outDir": "lib"
},
"typedocOptions": {
"entryPoints": [

View File

@ -6,8 +6,6 @@ import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
environment: 'node',
// TODO: There is no extension I know of that will let Vitest group tests like this was
globals: true,
coverage: {
exclude: ['__helpers__', 'generated-client']
}