Skip to content

Commit

Permalink
fix: add log level to vls test case
Browse files Browse the repository at this point in the history
  • Loading branch information
fi3ework committed Feb 6, 2022
1 parent c22f1d4 commit 70dc07a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/vite-plugin-checker/__tests__/unit/vlsConfig.spec.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import path from 'path'
import { ShutdownRequest } from 'vscode-languageserver/node'
import { ShutdownRequest, DiagnosticSeverity } from 'vscode-languageserver/node'
import { URI } from 'vscode-uri'

import { prepareClientConnection } from '../../src/checkers/vls/diagnostics'
import { prepareClientConnection, logLevel2Severity } from '../../src/checkers/vls/diagnostics'

async function testVslConfig(overrideConfig?: any) {
const workspaceUri = URI.file(path.join(__dirname, 'fixtures'))
const { clientConnection, serverConnection, vls, up, down, logger } =
await prepareClientConnection(workspaceUri, {
await prepareClientConnection(workspaceUri, logLevel2Severity['WARN'], {
watch: false,
verbose: false,
config: overrideConfig || null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const logLevels = ['ERROR', 'WARN', 'INFO', 'HINT'] as const

let disposeSuppressConsole: ReturnType<typeof suppressConsole>

const logLevel2Severity = {
export const logLevel2Severity = {
ERROR: DiagnosticSeverity.Error,
WARN: DiagnosticSeverity.Warning,
INFO: DiagnosticSeverity.Information,
Expand Down

0 comments on commit 70dc07a

Please sign in to comment.