Skip to content

Commit a8a3e8f

Browse files
committed
fix test
1 parent fc6bb8e commit a8a3e8f

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

step-generation/src/__tests__/flexStackerFillItems.test.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,33 @@ describe('flexStackerFillItems', () => {
7474
pythonName: 'mock_labware_5',
7575
},
7676
}
77+
vi.mocked(flexStackerStateGetter).mockReturnValue({
78+
labwareOnShuttle: {
79+
primaryLabwareId: 'mockLabwareId',
80+
adapterLabwareId: null,
81+
lidLabwareId: null,
82+
},
83+
labwareInHopper: [
84+
{
85+
primaryLabwareId: 'mockLabwareId',
86+
adapterLabwareId: null,
87+
lidLabwareId: null,
88+
},
89+
],
90+
maxPoolCount: 10,
91+
storedLabwareDetails: {
92+
moduleId,
93+
initialCount: 1,
94+
primaryLabware: {
95+
loadName: 'fixture_96_plate',
96+
namespace: 'opentrons',
97+
version: 1,
98+
},
99+
lidLabware: null,
100+
adapterLabware: null,
101+
},
102+
type: FLEX_STACKER_MODULE_TYPE,
103+
} as FlexStackerModuleState)
77104
})
78105
it('creates flex stacker fill command with 1 labware', () => {
79106
const result = flexStackerFillItems(

step-generation/src/commandCreators/atomic/flexStackerFillItems.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ export const flexStackerFillItems: CommandCreator<
3838
return {
3939
errors: [errorCreators.flexStackerHopperFull()],
4040
}
41-
}
42-
if (labware.length > 0) {
41+
} else if (labware.length > 0) {
4342
const allMatch = labware.every(lw =>
4443
labwareMatchesLabwareInHopper(lw, invariantContext, flexStackerState)
4544
)

0 commit comments

Comments
 (0)