Skip to content

Commit 62ace89

Browse files
committed
test: tighten browser permission assertions
1 parent 9b72e7c commit 62ace89

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

extensions/browser/src/browser/routes/permissions.test.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ describe("browser permission routes", () => {
107107
});
108108

109109
expect(response.statusCode).toBe(200);
110-
expect(response.body).toMatchObject({
110+
expect(response.body).toStrictEqual({
111111
ok: true,
112112
origin: "https://meet.google.com",
113113
grantedPermissions: ["audioCapture", "videoCapture"],
@@ -134,11 +134,12 @@ describe("browser permission routes", () => {
134134
});
135135

136136
expect(response.statusCode).toBe(200);
137-
expect(response.body).toMatchObject({
137+
expect(response.body).toStrictEqual({
138138
ok: true,
139139
origin: "https://meet.google.com",
140140
grantedPermissions: ["audioCapture", "videoCapture", "speakerSelection"],
141141
unsupportedPermissions: [],
142+
grantMethod: "cdp",
142143
});
143144
expect(profileCtx.ensureBrowserAvailable).toHaveBeenCalled();
144145
expect(cdpMocks.getChromeWebSocketUrl).toHaveBeenCalledWith("http://127.0.0.1:18800", 1234, {
@@ -166,10 +167,12 @@ describe("browser permission routes", () => {
166167
});
167168

168169
expect(response.statusCode).toBe(200);
169-
expect(response.body).toMatchObject({
170+
expect(response.body).toStrictEqual({
170171
ok: true,
172+
origin: "https://meet.google.com",
171173
grantedPermissions: ["audioCapture", "videoCapture"],
172174
unsupportedPermissions: ["speakerSelection"],
175+
grantMethod: "cdp",
173176
});
174177
expect(cdpMocks.send).toHaveBeenNthCalledWith(2, "Browser.grantPermissions", {
175178
origin: "https://meet.google.com",

0 commit comments

Comments
 (0)