@@ -6,6 +6,7 @@ import assert from 'assert'
66import sinon from 'sinon'
77import { DiffModel , AddedChangeNode , ModifiedChangeNode } from 'aws-core-vscode/codewhisperer/node'
88import { DescriptionContent } from 'aws-core-vscode/codewhisperer'
9+ import path from 'path'
910import { getTestResourceFilePath } from './amazonQGumbyUtil'
1011import { fs } from 'aws-core-vscode/shared'
1112import { createTestWorkspace } from 'aws-core-vscode/test'
@@ -56,6 +57,13 @@ describe('DiffModel', function () {
5657 const fileAmount = 1
5758 const workspaceFolder = await createTestWorkspace ( fileAmount , { fileContent : '' } )
5859
60+ sinon . replace ( fs , 'exists' , async ( path ) => true )
61+
62+ await fs . writeFile (
63+ path . join ( workspaceFolder . uri . fsPath , 'README.md' ) ,
64+ 'This guide walks you through using Gradle to build a simple Java project.'
65+ )
66+
5967 testDiffModel . parseDiff (
6068 getTestResourceFilePath ( 'resources/files/modifiedFile.diff' ) ,
6169 workspaceFolder . uri . fsPath ,
@@ -79,6 +87,13 @@ describe('DiffModel', function () {
7987 const fileAmount = 1
8088 const workspaceFolder = await createTestWorkspace ( fileAmount , { fileContent : '' } )
8189
90+ sinon . replace ( fs , 'exists' , async ( path ) => true )
91+
92+ await fs . writeFile (
93+ path . join ( workspaceFolder . uri . fsPath , 'README.md' ) ,
94+ 'This guide walks you through using Gradle to build a simple Java project.'
95+ )
96+
8297 testDiffModel . parseDiff (
8398 getTestResourceFilePath ( 'resources/files/modifiedFile.diff' ) ,
8499 workspaceFolder . uri . fsPath ,
0 commit comments