Skip to content

Commit

Permalink
Refactor: change to bitBakeProjectScannerClient
Browse files Browse the repository at this point in the history
  • Loading branch information
WilsonZiweiWang authored and deribaucourt committed Nov 28, 2023
1 parent 22c7a8a commit 1c3e58d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions server/src/__tests__/analyzer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { generateParser } from '../tree-sitter/parser'
import Analyzer from '../tree-sitter/analyzer'
import { FIXTURE_DOCUMENT, DUMMY_URI, FIXTURE_URI } from './fixtures/fixtures'
import { bitBakeProjectScanner } from '../BitBakeProjectScanner'
import { bitBakeProjectScannerClient } from '../BitbakeProjectScannerClient'
import path from 'path'
import fs from 'fs'
import { logger } from '../lib/src/utils/OutputLogger'
Expand Down Expand Up @@ -122,7 +122,7 @@ describe('getDirectiveFileUris', () => {
const parsedFooPath = path.parse(FIXTURE_DOCUMENT.FOO_INC.uri.replace('file://', ''))
const parsedBazPath = path.parse(FIXTURE_DOCUMENT.BAZ_BBCLASS.uri.replace('file://', ''))

jest.spyOn(bitBakeProjectScanner, 'includes', 'get').mockReturnValue([
bitBakeProjectScannerClient.bitbakeScanResult._includes = [
{
name: parsedBarPath.name,
path: parsedBarPath,
Expand All @@ -133,13 +133,13 @@ describe('getDirectiveFileUris', () => {
path: parsedFooPath,
extraInfo: 'layer: core'
}
])
]

jest.spyOn(bitBakeProjectScanner, 'classes', 'get').mockReturnValue([{
bitBakeProjectScannerClient.bitbakeScanResult._classes = [{
name: parsedBazPath.name,
path: parsedBazPath,
extraInfo: 'layer: core'
}])
}]

const parser = await generateParser()
const analyzer = await getAnalyzer()
Expand Down

0 comments on commit 1c3e58d

Please sign in to comment.