Skip to content

Commit b83ad60

Browse files
szuendDevtools-frontend LUCI CQ
authored andcommitted
[sdk] Run RuntimeModel.test.ts in Node.js as well
Drive-by: Add missing 'host:bundle' dependency [email protected] Bug: 451502260 Change-Id: Ib37bcb2e2104b524173cce73b154bf8bad8f0069 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7151122 Reviewed-by: Alex Rudenko <[email protected]> Commit-Queue: Simon Zünd <[email protected]>
1 parent b27cf10 commit b83ad60

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

front_end/core/sdk/BUILD.gn

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ ts_library("unittests") {
169169
"RehydratingConnection.test.ts",
170170
"RemoteObject.test.ts",
171171
"ResourceTreeModel.test.ts",
172-
"RuntimeModel.test.ts",
173172
"ScopeTreeCache.test.ts",
174173
"ScreenCaptureModel.test.ts",
175174
"Script.test.ts",
@@ -208,13 +207,15 @@ devtools_foundation_module("foundation_unittests") {
208207
testonly = true
209208

210209
sources = [
210+
"RuntimeModel.test.ts",
211211
"Target.test.ts",
212212
"TargetManager.test.ts",
213213
]
214214

215215
deps = [
216216
":bundle",
217217
"../../testing",
218+
"../host:bundle",
218219
"../platform:bundle",
219220
"../root:bundle",
220221
]

front_end/core/sdk/RuntimeModel.test.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@ import type * as Protocol from '../../generated/protocol.js';
66
import {
77
createTarget,
88
} from '../../testing/EnvironmentHelpers.js';
9-
import {
10-
describeWithMockConnection,
11-
} from '../../testing/MockConnection.js';
9+
import {setupRuntimeHooks} from '../../testing/RuntimeHelpers.js';
10+
import {setupSettingsHooks} from '../../testing/SettingsHelpers.js';
1211
import * as Platform from '../platform/platform.js';
1312

1413
import * as SDK from './sdk.js';
1514

1615
const {urlString} = Platform.DevToolsPath;
1716

18-
describeWithMockConnection('ExecutionContext', () => {
17+
describe('ExecutionContext', () => {
18+
setupRuntimeHooks();
19+
setupSettingsHooks();
20+
1921
function createExecutionContext(target: SDK.Target.Target, name?: string, isDefault?: boolean) {
2022
const runtimeModel = target.model(SDK.RuntimeModel.RuntimeModel);
2123
assert.exists(runtimeModel);

0 commit comments

Comments
 (0)