Skip to content

Commit 1df881b

Browse files
committed
fix test
1 parent 4452ab0 commit 1df881b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packages/amazonq/test/unit/codewhisperer/models/model.test.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ describe('model', function () {
8282

8383
beforeEach(function () {
8484
sandbox = sinon.createSandbox()
85+
state = CodeIssueGroupingStrategyState.instance
8586
})
8687

8788
afterEach(function () {
@@ -103,18 +104,18 @@ describe('model', function () {
103104
assert.equal(result, CodeIssueGroupingStrategy.Severity)
104105
})
105106

106-
it('should return stored state when valid', function () {
107+
it('should return stored state when valid', async function () {
107108
const validStrategy = CodeIssueGroupingStrategy.FileLocation
108-
state.setState(validStrategy)
109+
await state.setState(validStrategy)
109110

110111
const result = state.getState()
111112

112113
assert.equal(result, validStrategy)
113114
})
114115

115-
it('should return fallback when stored state is invalid', function () {
116+
it('should return fallback when stored state is invalid', async function () {
116117
const invalidStrategy = 'invalid'
117-
state.setState(invalidStrategy)
118+
await state.setState(invalidStrategy)
118119

119120
const result = state.getState()
120121

0 commit comments

Comments
 (0)