mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 03:18:24 +00:00 
			
		
		
		
	Use vitest globals (#27102)
Enable [globals](https://vitest.dev/config/#globals) in vitest, reducing the noise in test files.
This commit is contained in:
		| @@ -1,4 +1,3 @@ | ||||
| import {test, expect} from 'vitest'; | ||||
| import {parseIssueListQuickGotoLink} from './common-issue-list.js'; | ||||
|  | ||||
| test('parseIssueListQuickGotoLink', () => { | ||||
|   | ||||
| @@ -1,4 +1,3 @@ | ||||
| import {test, expect} from 'vitest'; | ||||
| import {singleAnchorRegex, rangeAnchorRegex} from './repo-code.js'; | ||||
|  | ||||
| test('singleAnchorRegex', () => { | ||||
|   | ||||
| @@ -1,4 +1,3 @@ | ||||
| import {describe, expect, test} from 'vitest'; | ||||
| import {strSubMatch, calcMatchedWeight, filterRepoFilesWeighted} from './repo-findfile.js'; | ||||
|  | ||||
| describe('Repo Find Files', () => { | ||||
|   | ||||
| @@ -1,4 +1,3 @@ | ||||
| import {test, expect} from 'vitest'; | ||||
| import {GET, POST, PATCH, PUT, DELETE} from './fetch.js'; | ||||
|  | ||||
| // tests here are only to satisfy the linter for unused functions | ||||
|   | ||||
| @@ -1,4 +1,3 @@ | ||||
| import {test, expect} from 'vitest'; | ||||
| import {showInfoToast, showErrorToast, showWarningToast} from './toast.js'; | ||||
|  | ||||
| test('showInfoToast', async () => { | ||||
|   | ||||
| @@ -1,4 +1,3 @@ | ||||
| import {expect, test} from 'vitest'; | ||||
| import {renderAnsi} from './ansi.js'; | ||||
|  | ||||
| test('renderAnsi', () => { | ||||
|   | ||||
| @@ -1,4 +1,3 @@ | ||||
| import {expect, test} from 'vitest'; | ||||
| import {svg, SvgIcon, svgParseOuterInner} from './svg.js'; | ||||
| import {createApp, h} from 'vue'; | ||||
|  | ||||
|   | ||||
| @@ -1,4 +1,3 @@ | ||||
| import {expect, test} from 'vitest'; | ||||
| import { | ||||
|   basename, extname, isObject, stripTags, parseIssueHref, | ||||
|   parseUrl, translateMonth, translateDay, blobToDataURI, | ||||
|   | ||||
| @@ -1,4 +1,3 @@ | ||||
| import {test, expect} from 'vitest'; | ||||
| import {useLightTextOnBackground} from './color.js'; | ||||
|  | ||||
| test('useLightTextOnBackground', () => { | ||||
|   | ||||
| @@ -1,4 +1,3 @@ | ||||
| import {test, expect} from 'vitest'; | ||||
| import {matchEmoji, matchMention} from './match.js'; | ||||
|  | ||||
| test('matchEmoji', () => { | ||||
|   | ||||
| @@ -1,4 +1,3 @@ | ||||
| import {expect, test} from 'vitest'; | ||||
| import {pathEscapeSegments} from './url.js'; | ||||
|  | ||||
| test('pathEscapeSegments', () => { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user