File tree Expand file tree Collapse file tree 3 files changed +30
-3
lines changed Expand file tree Collapse file tree 3 files changed +30
-3
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,9 @@ import * as vscode from 'vscode';
2
2
3
3
import { activate , FOO_TEMPLATE_URI , HOVER_COMMAND } from './helper' ;
4
4
5
- describe ( 'Angular Ivy LS quick info' , ( ) => {
5
+ // This hover tests appear to be the only flaky ones in the suite. Disable until they can
6
+ // consistently pass.
7
+ xdescribe ( 'Angular Ivy LS quick info' , ( ) => {
6
8
beforeAll ( async ( ) => {
7
9
await activate ( FOO_TEMPLATE_URI ) ;
8
10
} ) ;
Original file line number Diff line number Diff line change @@ -24,4 +24,4 @@ async function main() {
24
24
}
25
25
}
26
26
27
- main ( )
27
+ main ( ) ;
Original file line number Diff line number Diff line change @@ -9,11 +9,36 @@ export async function run(): Promise<void> {
9
9
] ,
10
10
} ) ;
11
11
12
+ // For whatever reason, the built-in jasmine reporter printin does not make it to the console
13
+ // output when the tests are run. In addition, allowing the default implementation to call
14
+ // `process.exit(1)` messes up the console reporting. The overrides below allow for both the
15
+ // proper exit code and the proper console reporting.
16
+ let failed = false ;
17
+ jasmine . configureDefaultReporter ( {
18
+ // The `print` function passed the reporter will be called to print its results.
19
+ print : function ( message : string ) {
20
+ if ( message . trim ( ) ) {
21
+ console . log ( message ) ;
22
+ }
23
+ } ,
24
+ } ) ;
25
+ jasmine . completionReporter = {
26
+ specDone : ( result : jasmine . SpecResult ) : void | Promise < void > => {
27
+ if ( result . failedExpectations . length > 0 ) {
28
+ failed = true ;
29
+ }
30
+ console . log ( result ) ;
31
+ } ,
32
+ } ;
33
+
12
34
console . log ( `Expecting to run ${ jasmine . specFiles . length } specs.` ) ;
13
35
14
36
if ( jasmine . specFiles . length === 0 ) {
15
37
throw new Error ( 'No specs found' ) ;
16
38
}
17
39
18
40
await jasmine . execute ( ) ;
19
- }
41
+ if ( failed ) {
42
+ process . exit ( 1 ) ;
43
+ }
44
+ }
You can’t perform that action at this time.
0 commit comments