Skip to content

Commit

Permalink
fixing failed unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ntarakad-aws committed Nov 19, 2024
1 parent 75d16a7 commit ee488f6
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import assert from 'assert'
import sinon from 'sinon'
import { DiffModel, AddedChangeNode, ModifiedChangeNode } from 'aws-core-vscode/codewhisperer/node'
import { DescriptionContent } from 'aws-core-vscode/codewhisperer'
import path from 'path'
import { getTestResourceFilePath } from './amazonQGumbyUtil'
import { fs } from 'aws-core-vscode/shared'
import { createTestWorkspace } from 'aws-core-vscode/test'
Expand Down Expand Up @@ -56,6 +57,13 @@ describe('DiffModel', function () {
const fileAmount = 1
const workspaceFolder = await createTestWorkspace(fileAmount, { fileContent: '' })

sinon.replace(fs, 'exists', async (path) => true)

await fs.writeFile(
path.join(workspaceFolder.uri.fsPath, 'README.md'),
'This guide walks you through using Gradle to build a simple Java project.'
)

testDiffModel.parseDiff(
getTestResourceFilePath('resources/files/modifiedFile.diff'),
workspaceFolder.uri.fsPath,
Expand All @@ -79,6 +87,13 @@ describe('DiffModel', function () {
const fileAmount = 1
const workspaceFolder = await createTestWorkspace(fileAmount, { fileContent: '' })

sinon.replace(fs, 'exists', async (path) => true)

await fs.writeFile(
path.join(workspaceFolder.uri.fsPath, 'README.md'),
'This guide walks you through using Gradle to build a simple Java project.'
)

testDiffModel.parseDiff(
getTestResourceFilePath('resources/files/modifiedFile.diff'),
workspaceFolder.uri.fsPath,
Expand Down

0 comments on commit ee488f6

Please sign in to comment.