-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(app, shared-data): app crashes when using python apiLevel<2.16 wi…
…th fixed trash (#16451)
- Loading branch information
1 parent
fc53c0f
commit 7fb38c9
Showing
5 changed files
with
64 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
shared-data/js/helpers/__tests__/getFixedTrashLabwareDefinition.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { describe, it, expect } from 'vitest' | ||
import { getFixedTrashLabwareDefinition } from '../index' | ||
import type { LabwareDefinition2 } from '../..' | ||
import fixedTrashUncasted from '../../../labware/definitions/2/opentrons_1_trash_3200ml_fixed/1.json' | ||
|
||
describe('getFixedTrashLabwareDefinition', () => { | ||
it(`should return the fixed trash labware defition`, () => { | ||
expect(getFixedTrashLabwareDefinition()).toEqual( | ||
(fixedTrashUncasted as unknown) as LabwareDefinition2 | ||
) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import type { LabwareDefinition2 } from '..' | ||
import fixedTrashUncasted from '../../labware/definitions/2/opentrons_1_trash_3200ml_fixed/1.json' | ||
|
||
export function getFixedTrashLabwareDefinition(): LabwareDefinition2 { | ||
const LabwareDefinition2 = (fixedTrashUncasted as unknown) as LabwareDefinition2 | ||
return LabwareDefinition2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters