@@ -12,7 +12,7 @@ let term: Terminal;
12
12
describe ( 'Headless API Tests' , function ( ) : void {
13
13
beforeEach ( ( ) => {
14
14
// Create default terminal to be used by most tests
15
- term = new Terminal ( ) ;
15
+ term = new Terminal ( { allowProposedApi : true } ) ;
16
16
} ) ;
17
17
18
18
it ( 'Default options' , async ( ) => {
@@ -102,7 +102,7 @@ describe('Headless API Tests', function (): void {
102
102
} ) ;
103
103
104
104
it ( 'clear' , async ( ) => {
105
- term = new Terminal ( { rows : 5 } ) ;
105
+ term = new Terminal ( { rows : 5 , allowProposedApi : true } ) ;
106
106
for ( let i = 0 ; i < 10 ; i ++ ) {
107
107
await writeSync ( '\n\rtest' + i ) ;
108
108
}
@@ -254,7 +254,7 @@ describe('Headless API Tests', function (): void {
254
254
255
255
describe ( 'buffer' , ( ) => {
256
256
it ( 'cursorX, cursorY' , async ( ) => {
257
- term = new Terminal ( { rows : 5 , cols : 5 } ) ;
257
+ term = new Terminal ( { rows : 5 , cols : 5 , allowProposedApi : true } ) ;
258
258
strictEqual ( term . buffer . active . cursorX , 0 ) ;
259
259
strictEqual ( term . buffer . active . cursorY , 0 ) ;
260
260
await writeSync ( 'foo' ) ;
@@ -275,7 +275,7 @@ describe('Headless API Tests', function (): void {
275
275
} ) ;
276
276
277
277
it ( 'viewportY' , async ( ) => {
278
- term = new Terminal ( { rows : 5 } ) ;
278
+ term = new Terminal ( { rows : 5 , allowProposedApi : true } ) ;
279
279
strictEqual ( term . buffer . active . viewportY , 0 ) ;
280
280
await writeSync ( '\n\n\n\n' ) ;
281
281
strictEqual ( term . buffer . active . viewportY , 0 ) ;
@@ -290,7 +290,7 @@ describe('Headless API Tests', function (): void {
290
290
} ) ;
291
291
292
292
it ( 'baseY' , async ( ) => {
293
- term = new Terminal ( { rows : 5 } ) ;
293
+ term = new Terminal ( { rows : 5 , allowProposedApi : true } ) ;
294
294
strictEqual ( term . buffer . active . baseY , 0 ) ;
295
295
await writeSync ( '\n\n\n\n' ) ;
296
296
strictEqual ( term . buffer . active . baseY , 0 ) ;
@@ -305,7 +305,7 @@ describe('Headless API Tests', function (): void {
305
305
} ) ;
306
306
307
307
it ( 'length' , async ( ) => {
308
- term = new Terminal ( { rows : 5 } ) ;
308
+ term = new Terminal ( { rows : 5 , allowProposedApi : true } ) ;
309
309
strictEqual ( term . buffer . active . length , 5 ) ;
310
310
await writeSync ( '\n\n\n\n' ) ;
311
311
strictEqual ( term . buffer . active . length , 5 ) ;
@@ -317,13 +317,13 @@ describe('Headless API Tests', function (): void {
317
317
318
318
describe ( 'getLine' , ( ) => {
319
319
it ( 'invalid index' , async ( ) => {
320
- term = new Terminal ( { rows : 5 } ) ;
320
+ term = new Terminal ( { rows : 5 , allowProposedApi : true } ) ;
321
321
strictEqual ( term . buffer . active . getLine ( - 1 ) , undefined ) ;
322
322
strictEqual ( term . buffer . active . getLine ( 5 ) , undefined ) ;
323
323
} ) ;
324
324
325
325
it ( 'isWrapped' , async ( ) => {
326
- term = new Terminal ( { cols : 5 } ) ;
326
+ term = new Terminal ( { cols : 5 , allowProposedApi : true } ) ;
327
327
strictEqual ( term . buffer . active . getLine ( 0 ) ! . isWrapped , false ) ;
328
328
strictEqual ( term . buffer . active . getLine ( 1 ) ! . isWrapped , false ) ;
329
329
await writeSync ( 'abcde' ) ;
@@ -335,7 +335,7 @@ describe('Headless API Tests', function (): void {
335
335
} ) ;
336
336
337
337
it ( 'translateToString' , async ( ) => {
338
- term = new Terminal ( { cols : 5 } ) ;
338
+ term = new Terminal ( { cols : 5 , allowProposedApi : true } ) ;
339
339
strictEqual ( term . buffer . active . getLine ( 0 ) ! . translateToString ( ) , ' ' ) ;
340
340
strictEqual ( term . buffer . active . getLine ( 0 ) ! . translateToString ( true ) , '' ) ;
341
341
await writeSync ( 'foo' ) ;
@@ -350,7 +350,7 @@ describe('Headless API Tests', function (): void {
350
350
} ) ;
351
351
352
352
it ( 'getCell' , async ( ) => {
353
- term = new Terminal ( { cols : 5 } ) ;
353
+ term = new Terminal ( { cols : 5 , allowProposedApi : true } ) ;
354
354
strictEqual ( term . buffer . active . getLine ( 0 ) ! . getCell ( - 1 ) , undefined ) ;
355
355
strictEqual ( term . buffer . active . getLine ( 0 ) ! . getCell ( 5 ) , undefined ) ;
356
356
strictEqual ( term . buffer . active . getLine ( 0 ) ! . getCell ( 0 ) ! . getChars ( ) , '' ) ;
@@ -366,7 +366,7 @@ describe('Headless API Tests', function (): void {
366
366
} ) ;
367
367
368
368
it ( 'active, normal, alternate' , async ( ) => {
369
- term = new Terminal ( { cols : 5 } ) ;
369
+ term = new Terminal ( { cols : 5 , allowProposedApi : true } ) ;
370
370
strictEqual ( term . buffer . active . type , 'normal' ) ;
371
371
strictEqual ( term . buffer . normal . type , 'normal' ) ;
372
372
strictEqual ( term . buffer . alternate . type , 'alternate' ) ;
0 commit comments