File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed
packages/amazonq/test/unit/amazonqGumby Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -6,25 +6,23 @@ import assert from 'assert'
66import sinon from 'sinon'
77import os from 'os'
88import { DiffModel , AddedChangeNode , ModifiedChangeNode } from 'aws-core-vscode/codewhisperer/node'
9+ import { PatchInfo } from 'aws-core-vscode/codewhisperer'
910import path from 'path'
1011import { getTestResourceFilePath } from './amazonQGumbyUtil'
1112import { fs } from 'aws-core-vscode/shared'
1213
13- type PatchDescription = {
14- name : string
15- fileName : string
16- isSuccessful : boolean
17- }
18-
1914describe ( 'DiffModel' , function ( ) {
15+ let parsedTestDescription : PatchInfo
16+ beforeEach ( ( ) => {
17+ parsedTestDescription = JSON . parse (
18+ '{"name": "Added file", "fileName": "resources/files/addedFile.diffs", "isSuccessful": true}'
19+ )
20+ } )
21+
2022 afterEach ( ( ) => {
2123 sinon . restore ( )
2224 } )
2325
24- const testDescription =
25- '{"name": "Added file", "fileName": "resources/files/addedFile.diffs", "isSuccessful": true}'
26- const parsedTestDescription : PatchDescription = JSON . parse ( testDescription )
27-
2826 it ( 'WHEN parsing a diff patch where a file was added THEN returns an array representing the added file' , async function ( ) {
2927 const testDiffModel = new DiffModel ( )
3028
You can’t perform that action at this time.
0 commit comments