@@ -15,71 +15,71 @@ describe('Options tests', () => {
15
15
jest . spyOn ( vscode . workspace , 'getConfiguration' ) . mockReturnValue ( getWorkspaceConfiguration ( ) ) ;
16
16
} ) ;
17
17
test ( 'Verify defaults' , ( ) => {
18
- expect ( commonOptions . serverPath . getValue ( vscode ) ) . toEqual ( '' ) ;
19
- expect ( omnisharpOptions . monoPath . getValue ( vscode ) ) . toEqual ( '' ) ;
20
- expect ( commonOptions . defaultSolution . getValue ( vscode ) ) . toEqual ( '' ) ;
21
- expect ( commonOptions . waitForDebugger . getValue ( vscode ) ) . toEqual ( false ) ;
22
- expect ( omnisharpOptions . loggingLevel . getValue ( vscode ) ) . toEqual ( 'information' ) ;
23
- expect ( omnisharpOptions . autoStart . getValue ( vscode ) ) . toEqual ( true ) ;
24
- expect ( omnisharpOptions . projectLoadTimeout . getValue ( vscode ) ) . toEqual ( 60 ) ;
25
- expect ( omnisharpOptions . maxProjectResults . getValue ( vscode ) ) . toEqual ( 250 ) ;
26
- expect ( omnisharpOptions . useEditorFormattingSettings . getValue ( vscode ) ) . toEqual ( true ) ;
27
- expect ( omnisharpOptions . useFormatting . getValue ( vscode ) ) . toEqual ( true ) ;
28
- expect ( omnisharpOptions . showReferencesCodeLens . getValue ( vscode ) ) . toEqual ( true ) ;
29
- expect ( omnisharpOptions . showTestsCodeLens . getValue ( vscode ) ) . toEqual ( true ) ;
30
- expect ( omnisharpOptions . disableCodeActions . getValue ( vscode ) ) . toEqual ( false ) ;
31
- expect ( omnisharpOptions . showOmnisharpLogOnError . getValue ( vscode ) ) . toEqual ( true ) ;
32
- expect ( omnisharpOptions . minFindSymbolsFilterLength . getValue ( vscode ) ) . toEqual ( 0 ) ;
33
- expect ( omnisharpOptions . maxFindSymbolsItems . getValue ( vscode ) ) . toEqual ( 1000 ) ;
34
- expect ( omnisharpOptions . enableMsBuildLoadProjectsOnDemand . getValue ( vscode ) ) . toEqual ( false ) ;
35
- expect ( omnisharpOptions . enableRoslynAnalyzers . getValue ( vscode ) ) . toEqual ( true ) ;
36
- expect ( omnisharpOptions . enableEditorConfigSupport . getValue ( vscode ) ) . toEqual ( true ) ;
37
- expect ( omnisharpOptions . enableDecompilationSupport . getValue ( vscode ) ) . toEqual ( false ) ;
38
- expect ( omnisharpOptions . enableImportCompletion . getValue ( vscode ) ) . toEqual ( false ) ;
39
- expect ( omnisharpOptions . enableAsyncCompletion . getValue ( vscode ) ) . toEqual ( false ) ;
40
- expect ( omnisharpOptions . analyzeOpenDocumentsOnly . getValue ( vscode ) ) . toEqual ( true ) ;
41
- expect ( commonOptions . runSettingsPath . getValue ( vscode ) ) . toEqual ( '' ) ;
18
+ expect ( commonOptions . serverPath ) . toEqual ( '' ) ;
19
+ expect ( omnisharpOptions . monoPath ) . toEqual ( '' ) ;
20
+ expect ( commonOptions . defaultSolution ) . toEqual ( '' ) ;
21
+ expect ( commonOptions . waitForDebugger ) . toEqual ( false ) ;
22
+ expect ( omnisharpOptions . loggingLevel ) . toEqual ( 'information' ) ;
23
+ expect ( omnisharpOptions . autoStart ) . toEqual ( true ) ;
24
+ expect ( omnisharpOptions . projectLoadTimeout ) . toEqual ( 60 ) ;
25
+ expect ( omnisharpOptions . maxProjectResults ) . toEqual ( 250 ) ;
26
+ expect ( omnisharpOptions . useEditorFormattingSettings ) . toEqual ( true ) ;
27
+ expect ( omnisharpOptions . useFormatting ) . toEqual ( true ) ;
28
+ expect ( omnisharpOptions . showReferencesCodeLens ) . toEqual ( true ) ;
29
+ expect ( omnisharpOptions . showTestsCodeLens ) . toEqual ( true ) ;
30
+ expect ( omnisharpOptions . disableCodeActions ) . toEqual ( false ) ;
31
+ expect ( omnisharpOptions . showOmnisharpLogOnError ) . toEqual ( true ) ;
32
+ expect ( omnisharpOptions . minFindSymbolsFilterLength ) . toEqual ( 0 ) ;
33
+ expect ( omnisharpOptions . maxFindSymbolsItems ) . toEqual ( 1000 ) ;
34
+ expect ( omnisharpOptions . enableMsBuildLoadProjectsOnDemand ) . toEqual ( false ) ;
35
+ expect ( omnisharpOptions . enableRoslynAnalyzers ) . toEqual ( true ) ;
36
+ expect ( omnisharpOptions . enableEditorConfigSupport ) . toEqual ( true ) ;
37
+ expect ( omnisharpOptions . enableDecompilationSupport ) . toEqual ( false ) ;
38
+ expect ( omnisharpOptions . enableImportCompletion ) . toEqual ( false ) ;
39
+ expect ( omnisharpOptions . enableAsyncCompletion ) . toEqual ( false ) ;
40
+ expect ( omnisharpOptions . analyzeOpenDocumentsOnly ) . toEqual ( true ) ;
41
+ expect ( commonOptions . runSettingsPath ) . toEqual ( '' ) ;
42
42
} ) ;
43
43
44
44
test ( 'Verify return no excluded paths when files.exclude empty' , ( ) => {
45
45
vscode . workspace . getConfiguration ( ) . update ( 'files.exclude' , { } ) ;
46
46
47
- const excludedPaths = commonOptions . excludePaths . getValue ( vscode ) ;
47
+ const excludedPaths = commonOptions . excludePaths ;
48
48
expect ( excludedPaths ) . toHaveLength ( 0 ) ;
49
49
} ) ;
50
50
51
51
test ( 'Verify return excluded paths when files.exclude populated' , ( ) => {
52
52
vscode . workspace . getConfiguration ( ) . update ( 'files.exclude' , { '**/node_modules' : true , '**/assets' : false } ) ;
53
53
54
- const excludedPaths = commonOptions . excludePaths . getValue ( vscode ) ;
54
+ const excludedPaths = commonOptions . excludePaths ;
55
55
expect ( excludedPaths ) . toStrictEqual ( [ '**/node_modules' ] ) ;
56
56
} ) ;
57
57
58
58
test ( 'Verify return no excluded paths when files.exclude and search.exclude empty' , ( ) => {
59
59
vscode . workspace . getConfiguration ( ) . update ( 'files.exclude' , { } ) ;
60
60
vscode . workspace . getConfiguration ( ) . update ( 'search.exclude' , { } ) ;
61
61
62
- const excludedPaths = commonOptions . excludePaths . getValue ( vscode ) ;
62
+ const excludedPaths = commonOptions . excludePaths ;
63
63
expect ( excludedPaths ) . toHaveLength ( 0 ) ;
64
64
} ) ;
65
65
66
66
test ( 'BACK-COMPAT: "omnisharp.loggingLevel": "verbose" == "omnisharp.loggingLevel": "debug"' , ( ) => {
67
67
vscode . workspace . getConfiguration ( ) . update ( 'omnisharp.loggingLevel' , 'verbose' ) ;
68
68
69
- expect ( omnisharpOptions . loggingLevel . getValue ( vscode ) ) . toEqual ( 'debug' ) ;
69
+ expect ( omnisharpOptions . loggingLevel ) . toEqual ( 'debug' ) ;
70
70
} ) ;
71
71
72
72
test ( 'BACK-COMPAT: "csharp.omnisharp" is used if it is set and "omnisharp.path" is not' , ( ) => {
73
73
vscode . workspace . getConfiguration ( ) . update ( 'csharp.omnisharp' , 'OldPath' ) ;
74
74
75
- expect ( commonOptions . serverPath . getValue ( vscode ) ) . toEqual ( 'OldPath' ) ;
75
+ expect ( commonOptions . serverPath ) . toEqual ( 'OldPath' ) ;
76
76
} ) ;
77
77
78
78
test ( 'BACK-COMPAT: "csharp.omnisharp" is not used if "omnisharp.path" is set' , ( ) => {
79
79
vscode . workspace . getConfiguration ( ) . update ( 'omnisharp.path' , 'NewPath' ) ;
80
80
vscode . workspace . getConfiguration ( ) . update ( 'csharp.omnisharp' , 'OldPath' ) ;
81
81
82
- expect ( commonOptions . serverPath . getValue ( vscode ) ) . toEqual ( 'NewPath' ) ;
82
+ expect ( commonOptions . serverPath ) . toEqual ( 'NewPath' ) ;
83
83
} ) ;
84
84
85
85
test ( '"omnisharp.defaultLaunchSolution" is used if set' , ( ) => {
@@ -90,18 +90,14 @@ describe('Options tests', () => {
90
90
91
91
vscode . workspace . getConfiguration ( ) . update ( 'omnisharp.defaultLaunchSolution' , 'some_valid_solution.sln' ) ;
92
92
93
- expect ( commonOptions . defaultSolution . getValue ( vscode ) ) . toEqual (
94
- path . join ( workspaceFolderUri . fsPath , 'some_valid_solution.sln' )
95
- ) ;
93
+ expect ( commonOptions . defaultSolution ) . toEqual ( path . join ( workspaceFolderUri . fsPath , 'some_valid_solution.sln' ) ) ;
96
94
} ) ;
97
95
98
96
test ( '"omnisharp.testRunSettings" is used if set' , ( ) => {
99
97
vscode . workspace
100
98
. getConfiguration ( )
101
99
. update ( 'omnisharp.testRunSettings' , 'some_valid_path\\some_valid_runsettings_files.runsettings' ) ;
102
100
103
- expect ( commonOptions . runSettingsPath . getValue ( vscode ) ) . toEqual (
104
- 'some_valid_path\\some_valid_runsettings_files.runsettings'
105
- ) ;
101
+ expect ( commonOptions . runSettingsPath ) . toEqual ( 'some_valid_path\\some_valid_runsettings_files.runsettings' ) ;
106
102
} ) ;
107
103
} ) ;
0 commit comments