Skip to content

Commit

Permalink
remove redunant code
Browse files Browse the repository at this point in the history
  • Loading branch information
SunsetTechuila committed Jan 31, 2025
1 parent 4cc33db commit 6f38244
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions src/test/suite/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as assert from 'assert'
import * as os from 'os'
import { Position, window, workspace, WorkspaceEdit, Uri } from 'vscode'
import { Position, window, workspace, WorkspaceEdit } from 'vscode'
import { getFixturePath, getOptionsForFixture, wait } from '../testUtils'

import * as utils from 'vscode-test-utils'
Expand Down Expand Up @@ -291,7 +291,7 @@ suite('EditorConfig extension', function () {
}).saveText('foobar')
assert(window.activeTextEditor, 'no active editor')

// Before saving, the selection is on line 0. This should remain unchanged.
// Before saving, the selection is on line 0. This should remain unchanged.
assert.strictEqual(
window.activeTextEditor.selection.start.line,
0,
Expand Down Expand Up @@ -336,15 +336,10 @@ function withSetting(
},
}
async function createDoc(contents = '', name = 'test') {
const fixturePath = getFixturePath([rule, value, name])

try {
await workspace.fs.delete(Uri.file(fixturePath))
} catch {
// ignore
}

const uri = await utils.createFile(contents, fixturePath)
const uri = await utils.createFile(
contents,
getFixturePath([rule, value, name]),
)
const doc = await workspace.openTextDocument(uri)
await window.showTextDocument(doc)
await wait(100) // wait for EditorConfig to apply new settings
Expand Down

0 comments on commit 6f38244

Please sign in to comment.