5
5
6
6
import * as path from 'path' ;
7
7
import * as vscode from 'vscode' ;
8
- import * as jestLib from '@jest/globals' ;
8
+ import { describe , beforeAll , afterAll , test , expect } from '@jest/globals' ;
9
9
import testAssetWorkspace from './testAssets/testAssetWorkspace' ;
10
10
import * as integrationHelpers from '../integrationTests/integrationHelpers' ;
11
11
@@ -21,8 +21,8 @@ function normalizeNewlines(original: string | undefined): string | undefined {
21
21
return original ;
22
22
}
23
23
24
- jestLib . describe ( `Razor Formatting ${ testAssetWorkspace . description } ` , function ( ) {
25
- jestLib . beforeAll ( async function ( ) {
24
+ describe ( `Razor Formatting ${ testAssetWorkspace . description } ` , function ( ) {
25
+ beforeAll ( async function ( ) {
26
26
if ( ! integrationHelpers . isRazorWorkspace ( vscode . workspace ) ) {
27
27
return ;
28
28
}
@@ -36,11 +36,11 @@ jestLib.describe(`Razor Formatting ${testAssetWorkspace.description}`, function
36
36
await integrationHelpers . activateCSharpExtension ( ) ;
37
37
} ) ;
38
38
39
- jestLib . afterAll ( async ( ) => {
39
+ afterAll ( async ( ) => {
40
40
await testAssetWorkspace . cleanupWorkspace ( ) ;
41
41
} ) ;
42
42
43
- jestLib . test ( 'Document formatted correctly' , async ( ) => {
43
+ test ( 'Document formatted correctly' , async ( ) => {
44
44
if ( ! integrationHelpers . isRazorWorkspace ( vscode . workspace ) ) {
45
45
return ;
46
46
}
@@ -59,7 +59,7 @@ jestLib.describe(`Razor Formatting ${testAssetWorkspace.description}`, function
59
59
}
60
60
) ;
61
61
62
- jestLib . expect ( edits ) . toBeDefined ( ) ;
62
+ expect ( edits ) . toBeDefined ( ) ;
63
63
64
64
console . log ( `Got ${ edits . length } edits` ) ;
65
65
@@ -75,7 +75,7 @@ jestLib.describe(`Razor Formatting ${testAssetWorkspace.description}`, function
75
75
76
76
console . log ( `Checking document contents...` ) ;
77
77
78
- jestLib . expect ( contents ) . toBe (
78
+ expect ( contents ) . toBe (
79
79
normalizeNewlines ( `@page "/bad"
80
80
81
81
@code {
0 commit comments