Skip to content

Commit 51fa167

Browse files
committed
Addressing feedback
1 parent 001f082 commit 51fa167

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

File renamed without changes.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@
672672
"build-and-lint": "npm run build && npm run lint",
673673
"watch": "npm run watch-wp",
674674
"watch-wp": "webpack --watch",
675-
"lint": "eslint -c .eslintrc.js */*.ts",
675+
"lint": "eslint -c .eslintrc.mjs */*.ts",
676676
"test": "npm run lint && jest --config package.json --runInBand --env=jsdom"
677677
},
678678
"dependencies": {

test/extension.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ describe("extension", () => {
375375

376376
const newExtension = await import("../src/extension");
377377
await newExtension.attach(createFakeExtensionContext(), expectedMissingUrl);
378-
expect(mocks.vscode.window.showErrorMessage).toHaveBeenCalledWith (expect.stringContaining(expectedMissingUrl));
378+
expect(mocks.vscode.window.showErrorMessage).toHaveBeenCalledWith(expect.stringContaining(expectedMissingUrl));
379379
});
380380

381381
it("shows error if it can't find given target due to missing urls", async () => {
@@ -384,7 +384,7 @@ describe("extension", () => {
384384

385385
const newExtension = await import("../src/extension");
386386
await newExtension.attach(createFakeExtensionContext(), expectedUrl);
387-
expect(mocks.vscode.window.showErrorMessage).toHaveBeenCalledWith (expect.stringContaining(expectedUrl));
387+
expect(mocks.vscode.window.showErrorMessage).toHaveBeenCalledWith(expect.stringContaining(expectedUrl));
388388
});
389389

390390
it("reports telemetry if failed to get targets", async () => {
@@ -709,7 +709,7 @@ describe("extension", () => {
709709
const newExtension = await import("../src/extension");
710710

711711
await newExtension.attachToCurrentDebugTarget(createFakeExtensionContext());
712-
expect(mocks.vscode.window.showErrorMessage).toHaveBeenCalledWith (expect.stringContaining(expectedErrorMessage));
712+
expect(mocks.vscode.window.showErrorMessage).toHaveBeenCalledWith(expect.stringContaining(expectedErrorMessage));
713713
});
714714

715715
it("creates a panel with a constructed url", async () => {

test/launchConfigManager.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ describe("launchConfigManager", () => {
2121
fse.pathExistsSync.mockImplementation(() => false);
2222
const launchConfigManager = LaunchConfigManager.instance;
2323
expect(launchConfigManager.getLaunchConfig()).toEqual('None');
24-
expect(vscodeMock.commands.executeCommand).toHaveBeenCalledWith ('setContext', 'launchJsonStatus', 'None');
24+
expect(vscodeMock.commands.executeCommand).toHaveBeenCalledWith('setContext', 'launchJsonStatus', 'None');
2525
});
2626

2727
it('updates launchJsonStatus with "Unsupported" when there is no supported debug config', async () => {
@@ -35,7 +35,7 @@ describe("launchConfigManager", () => {
3535
});
3636
const launchConfigManager = LaunchConfigManager.instance;
3737
expect(launchConfigManager.getLaunchConfig()).toEqual('Unsupported');
38-
expect(vscodeMock.commands.executeCommand).toHaveBeenCalledWith ('setContext', 'launchJsonStatus', 'Unsupported');
38+
expect(vscodeMock.commands.executeCommand).toHaveBeenCalledWith('setContext', 'launchJsonStatus', 'Unsupported');
3939
});
4040

4141
it('returns a supported debug config when one exists', async () => {
@@ -141,7 +141,7 @@ describe("launchConfigManager", () => {
141141
vscodeMock.Uri.joinPath = jest.fn();
142142
const launchConfigManager = LaunchConfigManager.instance;
143143
launchConfigManager.configureLaunchJson();
144-
expect(vscodeMock.WorkspaceConfiguration.update).toHaveBeenCalledWith ('configurations', Array(4).fill(expect.anything()));
144+
expect(vscodeMock.WorkspaceConfiguration.update).toHaveBeenCalledWith('configurations', Array(4).fill(expect.anything()));
145145
});
146146
});
147147

test/utils.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,14 +1037,14 @@ describe("utils", () => {
10371037
}
10381038
});
10391039

1040-
jest.doMock("vscode", () => typeof import("vscode"), { virtual: true });
1040+
jest.doMock("vscode", () => vscodeMock, { virtual: true });
10411041
jest.resetModules();
10421042
});
10431043

10441044
it('correctly records all changed extension settings', async () => {
10451045
const reporter = createFakeTelemetryReporter();
10461046
utils.reportExtensionSettings(reporter);
1047-
expect(reporter.sendTelemetryEvent).toHaveBeenCalledWith ('user/settingsChangedAtLaunch', { isHeadless: 'false' });
1047+
expect(reporter.sendTelemetryEvent).toHaveBeenCalledWith('user/settingsChangedAtLaunch', { isHeadless: 'false' });
10481048
});
10491049

10501050
it('correctly sends telemetry event for changed event', async () => {
@@ -1057,7 +1057,7 @@ describe("utils", () => {
10571057
}
10581058
}};
10591059
utils.reportChangedExtensionSetting(configurationChangedEvent, reporter);
1060-
expect(reporter.sendTelemetryEvent).toHaveBeenCalledWith ('user/settingsChanged', { isHeadless: 'false' });
1060+
expect(reporter.sendTelemetryEvent).toHaveBeenCalledWith('user/settingsChanged', { isHeadless: 'false' });
10611061
});
10621062
});
10631063
});

0 commit comments

Comments
 (0)