Merge pull request #1754 from vladimirze/run-tests-and-tslint-for-addons-directory
Run tests & tslint for src/addons directory
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { assert, expect } from 'chai';
|
import { assert } from 'chai';
|
||||||
|
|
||||||
import * as attach from './attach';
|
import * as attach from './attach';
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { assert, expect } from 'chai';
|
import { assert } from 'chai';
|
||||||
|
|
||||||
import * as fit from './fit';
|
import * as fit from './fit';
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { assert, expect } from 'chai';
|
import { assert } from 'chai';
|
||||||
|
|
||||||
import * as fullscreen from './fullscreen';
|
import * as fullscreen from './fullscreen';
|
||||||
|
|
||||||
|
|||||||
@@ -11,17 +11,18 @@ import { Terminal } from 'xterm';
|
|||||||
* @param fullscreen Toggle fullscreen on (true) or off (false)
|
* @param fullscreen Toggle fullscreen on (true) or off (false)
|
||||||
*/
|
*/
|
||||||
export function toggleFullScreen(term: Terminal, fullscreen: boolean): void {
|
export function toggleFullScreen(term: Terminal, fullscreen: boolean): void {
|
||||||
let fn: string;
|
let fn: (...tokens: string[]) => void;
|
||||||
|
|
||||||
if (typeof fullscreen === 'undefined') {
|
if (typeof fullscreen === 'undefined') {
|
||||||
fn = (term.element.classList.contains('fullscreen')) ? 'remove' : 'add';
|
fn = (term.element.classList.contains('fullscreen')) ?
|
||||||
|
term.element.classList.remove : term.element.classList.add;
|
||||||
} else if (!fullscreen) {
|
} else if (!fullscreen) {
|
||||||
fn = 'remove';
|
fn = term.element.classList.remove;
|
||||||
} else {
|
} else {
|
||||||
fn = 'add';
|
fn = term.element.classList.add;
|
||||||
}
|
}
|
||||||
|
|
||||||
term.element.classList[fn]('fullscreen');
|
fn('fullscreen');
|
||||||
}
|
}
|
||||||
|
|
||||||
export function apply(terminalConstructor: typeof Terminal): void {
|
export function apply(terminalConstructor: typeof Terminal): void {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
* Copyright (c) 2018 The xterm.js authors. All rights reserved.
|
* Copyright (c) 2018 The xterm.js authors. All rights reserved.
|
||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
|
declare var require: any;
|
||||||
|
|
||||||
import { assert, expect } from 'chai';
|
import { assert, expect } from 'chai';
|
||||||
import * as search from './search';
|
import * as search from './search';
|
||||||
|
|||||||
@@ -18,8 +18,5 @@
|
|||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.ts"
|
"**/*.ts"
|
||||||
],
|
|
||||||
"exclude": [
|
|
||||||
"**/*.test.ts"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { assert, expect } from 'chai';
|
import { assert } from 'chai';
|
||||||
|
|
||||||
import * as terminado from './terminado';
|
import * as terminado from './terminado';
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { assert, expect } from 'chai';
|
import { assert } from 'chai';
|
||||||
|
|
||||||
import * as webLinks from './webLinks';
|
import * as webLinks from './webLinks';
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { assert, expect } from 'chai';
|
import { assert } from 'chai';
|
||||||
|
|
||||||
import * as winptyCompat from './winptyCompat';
|
import * as winptyCompat from './winptyCompat';
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { assert, expect } from 'chai';
|
import { assert } from 'chai';
|
||||||
|
|
||||||
import * as zmodem from './zmodem';
|
import * as zmodem from './zmodem';
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ import { Terminal } from 'xterm';
|
|||||||
* via `detach()` and a re-`attach()`.)
|
* via `detach()` and a re-`attach()`.)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
let zmodem;
|
let zmodem: any;
|
||||||
|
|
||||||
export interface IZmodemOptions {
|
export interface IZmodemOptions {
|
||||||
noTerminalWriteOutsideSession?: boolean;
|
noTerminalWriteOutsideSession?: boolean;
|
||||||
@@ -44,7 +44,7 @@ function zmodemAttach(ws: WebSocket, opts: IZmodemOptions = {}): void {
|
|||||||
const term = this;
|
const term = this;
|
||||||
const senderFunc = (octets: ArrayLike<number>) => ws.send(new Uint8Array(octets));
|
const senderFunc = (octets: ArrayLike<number>) => ws.send(new Uint8Array(octets));
|
||||||
|
|
||||||
let zsentry;
|
let zsentry: any;
|
||||||
|
|
||||||
function shouldWrite(): boolean {
|
function shouldWrite(): boolean {
|
||||||
return !!zsentry.get_confirmed_session() || !opts.noTerminalWriteOutsideSession;
|
return !!zsentry.get_confirmed_session() || !opts.noTerminalWriteOutsideSession;
|
||||||
|
|||||||
Reference in New Issue
Block a user