Skip to content

Commit

Permalink
Get rid of odd missing node test
Browse files Browse the repository at this point in the history
  • Loading branch information
skovhus committed Jun 10, 2023
1 parent cba4729 commit e2624e6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 26 deletions.
3 changes: 1 addition & 2 deletions server/src/__tests__/analyzer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { Logger } from '../util/logger'
const CURRENT_URI = 'dummy-uri.sh'

// if you add a .sh file to testing/fixtures, update this value
const FIXTURE_FILES_MATCHING_GLOB = 17
const FIXTURE_FILES_MATCHING_GLOB = 16

const defaultConfig = getDefaultConfiguration()

Expand Down Expand Up @@ -811,7 +811,6 @@ describe('initiateBackgroundAnalysis', () => {
expect(loggerWarn).toHaveBeenCalled()
expect(loggerWarn.mock.calls).toEqual([
[expect.stringContaining('missing-node.sh: syntax error')],
[expect.stringContaining('missing-node2.sh: syntax error')],
[expect.stringContaining('not-a-shell-script.sh: syntax error')],
[expect.stringContaining('parse-problems.sh: syntax error')],
[expect.stringContaining('sourcing.sh line 16: failed to resolve path')],
Expand Down
10 changes: 5 additions & 5 deletions server/src/__tests__/server.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1067,16 +1067,16 @@ describe('server', () => {
})

it('responds with documentation even if parsing fails', async () => {
const result = await getHoverResult(FIXTURE_URI.MISSING_NODE2, {
// sleep
line: 12,
character: 4,
const result = await getHoverResult(FIXTURE_URI.MISSING_NODE, {
// echo
line: 11,
character: 2,
})

expect(result).toEqual({
contents: {
kind: 'markdown',
value: expect.stringContaining('sleep'),
value: expect.stringContaining('echo'),
},
})
})
Expand Down
1 change: 0 additions & 1 deletion testing/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export const FIXTURE_URI = {
MISSING_EXTENSION: `file://${path.join(FIXTURE_FOLDER, 'extension')}`,
EXTENSION_INC: `file://${path.join(FIXTURE_FOLDER, 'extension.inc')}`,
MISSING_NODE: `file://${path.join(FIXTURE_FOLDER, 'missing-node.sh')}`,
MISSING_NODE2: `file://${path.join(FIXTURE_FOLDER, 'missing-node2.sh')}`,
OPTIONS: `file://${path.join(FIXTURE_FOLDER, 'options.sh')}`,
OVERRIDE_SYMBOL: `file://${path.join(FIXTURE_FOLDER, 'override-executable-symbol.sh')}`,
PARSE_PROBLEMS: `file://${path.join(FIXTURE_FOLDER, 'parse-problems.sh')}`,
Expand Down
18 changes: 0 additions & 18 deletions testing/fixtures/missing-node2.sh

This file was deleted.

0 comments on commit e2624e6

Please sign in to comment.