Skip to content

Commit

Permalink
Remove vitest globals (go-gitea#21505)
Browse files Browse the repository at this point in the history
Explicitly import them instead which is cleaner and enables better
editor integration.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
  • Loading branch information
3 people committed Oct 19, 2022
1 parent e27d52b commit 37ca4cb
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 4 deletions.
3 changes: 0 additions & 3 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ overrides:
rules:
import/no-unresolved: [0]
import/no-extraneous-dependencies: [0]
- files: ["*.test.js"]
env:
jest: true
- files: ["*.config.js"]
rules:
import/no-unused-modules: [0]
Expand Down
1 change: 0 additions & 1 deletion vitest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export default defineConfig({
open: false,
allowOnly: true,
passWithNoTests: true,
globals: true,
watch: false,
},
plugins: [
Expand Down
1 change: 1 addition & 0 deletions web_src/js/features/repo-findfile.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {describe, expect, test} from 'vitest';
import {strSubMatch, calcMatchedWeight, filterRepoFilesWeighted} from './repo-findfile.js';

describe('Repo Find Files', () => {
Expand Down
1 change: 1 addition & 0 deletions web_src/js/svg.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {expect, test} from 'vitest';
import {svg} from './svg.js';

test('svg', () => {
Expand Down
1 change: 1 addition & 0 deletions web_src/js/utils.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {expect, test} from 'vitest';
import {
basename, extname, isObject, uniq, stripTags, joinPaths, parseIssueHref,
prettyNumber, parseUrl,
Expand Down

0 comments on commit 37ca4cb

Please sign in to comment.