Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable noUncheckedIndexedAccess in tsconfig.json #829

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add non-null assertions to tests
MidnightDesign committed Sep 4, 2023
commit 1f95e04f9de5ab48e3f06802d5d20d0edd20006d
8 changes: 4 additions & 4 deletions tests/ui/scanner/camera-selection-ui.test.ts
Original file line number Diff line number Diff line change
@@ -123,10 +123,10 @@ describe("CameraSelectionUi setting and getting values", () => {
let cameraSelectUi = CameraSelectionUi.create(parentElement!, cameras);

// First camera is default.
expect(cameraSelectUi.getValue()).eq(cameras[0].id);
expect(cameraSelectUi.getValue()).eq(cameras[0]!.id);

cameraSelectUi.setValue(cameras[1].id);
expect(cameraSelectUi.getValue()).eq(cameras[1].id);
cameraSelectUi.setValue(cameras[1]!.id);
expect(cameraSelectUi.getValue()).eq(cameras[1]!.id);

expect(() => {
cameraSelectUi.setValue("random string");
@@ -138,7 +138,7 @@ describe("CameraSelectionUi setting and getting values", () => {
let cameras = createCameraList(numCameras);
let cameraSelectUi = CameraSelectionUi.create(parentElement!, cameras);

expect(cameraSelectUi.hasValue(cameras[1].id)).to.be.true;
expect(cameraSelectUi.hasValue(cameras[1]!.id)).to.be.true;
expect(cameraSelectUi.hasValue("random string")).to.be.false;
});
});