Skip to content

Commit 8f7fa07

Browse files
committed
fix(dev): update failing test to assert items that should be equal
1 parent aaa0a5d commit 8f7fa07

File tree

1 file changed

+11
-16
lines changed

1 file changed

+11
-16
lines changed

packages/core/src/test/amazonqFeatureDev/session/sessionState.test.ts

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -113,29 +113,24 @@ describe('sessionState', () => {
113113
codeGenerationTotalIterationCount: 3,
114114
})
115115

116-
const currentCodeGenerationId = crypto.randomUUID()
117116
mockExportResultArchive = sinon.stub().resolves({ newFileContents: [], deletedFiles: [], references: [] })
118117

119118
const testAction = mockSessionStateAction()
120119
const state = new CodeGenState(testConfig, [], [], [], tabId, 0, {}, 2, 3)
121120
const result = await state.interact(testAction)
122121

123-
const nextState = new PrepareCodeGenState(
124-
testConfig,
125-
[],
126-
[],
127-
[],
128-
tabId,
129-
1,
130-
2,
131-
3,
132-
undefined,
133-
currentCodeGenerationId,
134-
{}
135-
)
122+
const nextState = new PrepareCodeGenState(testConfig, [], [], [], tabId, 1, 2, 3, undefined)
136123

137-
assert.deepStrictEqual(result, {
138-
nextState,
124+
assert.deepStrictEqual(result.nextState?.deletedFiles, {
125+
nextState: nextState.deletedFiles,
126+
interaction: {},
127+
})
128+
assert.deepStrictEqual(result.nextState?.filePaths, {
129+
nextState: nextState.filePaths,
130+
interaction: {},
131+
})
132+
assert.deepStrictEqual(result.nextState?.references, {
133+
nextState: nextState.references,
139134
interaction: {},
140135
})
141136
})

0 commit comments

Comments
 (0)