@@ -2,7 +2,6 @@ import * as assert from 'assert';
2
2
import { before , beforeEach } from 'mocha' ;
3
3
4
4
import * as auto from './automation' ;
5
- import { TIMEOUT_MS } from './setup' ;
6
5
7
6
// can directly import extension if needed
8
7
// import * as myExtension from '../../extension';
17
16
` ;
18
17
19
18
suite ( 'Syntax Tree' , ( ) => {
20
- suite ( 'commands' , ( ) => {
21
- beforeEach ( auto . reset ) ;
19
+ beforeEach ( auto . reset ) ;
22
20
21
+ suite ( 'lifecycle commands' , ( ) => {
23
22
test ( 'start' , async ( ) => {
24
23
await auto . start ( ) ;
25
24
const text = await auto . showOutputChannel ( ) ;
@@ -37,13 +36,18 @@ suite('Syntax Tree', () => {
37
36
await auto . restart ( ) ;
38
37
const text = await auto . showOutputChannel ( ) ;
39
38
assert . match ( text , / ^ R e s t a r t i n g l a n g u a g e s e r v e r / m) ;
39
+ assert . match ( text , / ^ S t o p p i n g l a n g u a g e s e r v e r / m) ;
40
+ assert . match ( text , / ^ S t a r t i n g l a n g u a g e s e r v e r / ) ;
40
41
} )
41
42
} ) ;
42
43
43
- // TODO: figure out re-entrancy issue in CI (prolly two LanguageClient instances at once?)
44
- test . skip ( 'Format Document' , async ( ) => {
45
- const editor = await auto . createEditor ( UNFORMATTED ) ;
46
- await auto . formatDocument ( ) ;
47
- assert . equal ( editor . document . getText ( ) , FORMATTED ) ;
48
- } ) ;
44
+ suite ( 'functional commands' , ( ) => {
45
+ before ( auto . start ) ;
46
+
47
+ test ( 'Format Document' , async ( ) => {
48
+ const editor = await auto . createEditor ( UNFORMATTED ) ;
49
+ await auto . formatDocument ( ) ;
50
+ assert . equal ( editor . document . getText ( ) , FORMATTED ) ;
51
+ } ) ;
52
+ } )
49
53
} ) ;
0 commit comments