Skip to content

Commit 56809d5

Browse files
committed
Apply PR feedback
1 parent fee73cd commit 56809d5

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

test/razorIntegrationTests/formatting.integration.test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import * as path from 'path';
77
import * as vscode from 'vscode';
8-
import * as jestLib from '@jest/globals';
8+
import { describe, beforeAll, afterAll, test, expect } from '@jest/globals';
99
import testAssetWorkspace from './testAssets/testAssetWorkspace';
1010
import * as integrationHelpers from '../integrationTests/integrationHelpers';
1111

@@ -21,8 +21,8 @@ function normalizeNewlines(original: string | undefined): string | undefined {
2121
return original;
2222
}
2323

24-
jestLib.describe(`Razor Formatting ${testAssetWorkspace.description}`, function () {
25-
jestLib.beforeAll(async function () {
24+
describe(`Razor Formatting ${testAssetWorkspace.description}`, function () {
25+
beforeAll(async function () {
2626
if (!integrationHelpers.isRazorWorkspace(vscode.workspace)) {
2727
return;
2828
}
@@ -36,11 +36,11 @@ jestLib.describe(`Razor Formatting ${testAssetWorkspace.description}`, function
3636
await integrationHelpers.activateCSharpExtension();
3737
});
3838

39-
jestLib.afterAll(async () => {
39+
afterAll(async () => {
4040
await testAssetWorkspace.cleanupWorkspace();
4141
});
4242

43-
jestLib.test('Document formatted correctly', async () => {
43+
test('Document formatted correctly', async () => {
4444
if (!integrationHelpers.isRazorWorkspace(vscode.workspace)) {
4545
return;
4646
}
@@ -59,7 +59,7 @@ jestLib.describe(`Razor Formatting ${testAssetWorkspace.description}`, function
5959
}
6060
);
6161

62-
jestLib.expect(edits).toBeDefined();
62+
expect(edits).toBeDefined();
6363

6464
console.log(`Got ${edits.length} edits`);
6565

@@ -75,7 +75,7 @@ jestLib.describe(`Razor Formatting ${testAssetWorkspace.description}`, function
7575

7676
console.log(`Checking document contents...`);
7777

78-
jestLib.expect(contents).toBe(
78+
expect(contents).toBe(
7979
normalizeNewlines(`@page "/bad"
8080
8181
@code {

test/razorIntegrationTests/hover.integration.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55

66
import * as path from 'path';
77
import * as vscode from 'vscode';
8-
import * as jestLib from '@jest/globals';
8+
import { describe, beforeAll, afterAll, test, expect } from '@jest/globals';
99
import testAssetWorkspace from './testAssets/testAssetWorkspace';
1010
import * as integrationHelpers from '../integrationTests/integrationHelpers';
1111

12-
jestLib.describe(`Razor Hover ${testAssetWorkspace.description}`, function () {
13-
jestLib.beforeAll(async function () {
12+
describe(`Razor Hover ${testAssetWorkspace.description}`, function () {
13+
beforeAll(async function () {
1414
if (!integrationHelpers.isRazorWorkspace(vscode.workspace)) {
1515
return;
1616
}
@@ -19,11 +19,11 @@ jestLib.describe(`Razor Hover ${testAssetWorkspace.description}`, function () {
1919
await integrationHelpers.activateCSharpExtension();
2020
});
2121

22-
jestLib.afterAll(async () => {
22+
afterAll(async () => {
2323
await testAssetWorkspace.cleanupWorkspace();
2424
});
2525

26-
jestLib.test('Tag Helper Hover', async () => {
26+
test('Tag Helper Hover', async () => {
2727
if (!integrationHelpers.isRazorWorkspace(vscode.workspace)) {
2828
return;
2929
}
@@ -42,12 +42,12 @@ jestLib.describe(`Razor Hover ${testAssetWorkspace.description}`, function () {
4242
}
4343
);
4444

45-
jestLib.expect(hover).toBeDefined();
45+
expect(hover).toBeDefined();
4646

47-
jestLib.expect(hover.length).toBe(1);
47+
expect(hover.length).toBe(1);
4848
const first = hover[0];
4949
const answer =
5050
'The input element represents a typed data field, usually with a form control to allow the user to edit the data.';
51-
jestLib.expect((<{ language: string; value: string }>first.contents[0]).value).toContain(answer);
51+
expect((<{ language: string; value: string }>first.contents[0]).value).toContain(answer);
5252
});
5353
});

0 commit comments

Comments
 (0)