Convert linefeed to EventEmitter2
This commit is contained in:
+11
-1
@@ -17,7 +17,7 @@ class TestTerminal extends Terminal {
|
||||
public keyPress(ev: any): boolean { return this._keyPress(ev); }
|
||||
}
|
||||
|
||||
describe('term.js addons', () => {
|
||||
describe('xterm.js', () => {
|
||||
let term: TestTerminal;
|
||||
const termOptions = {
|
||||
cols: INIT_COLS,
|
||||
@@ -95,6 +95,16 @@ describe('term.js addons', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('linefeed', () => {
|
||||
it('should emit a linefeed event', (done) => {
|
||||
term.on('linefeed', () => {
|
||||
done();
|
||||
});
|
||||
|
||||
term.write('\n');
|
||||
});
|
||||
});
|
||||
|
||||
describe(`keypress (including 'key' event)`, () => {
|
||||
it('should receive a string and event object', (done) => {
|
||||
let steps = 0;
|
||||
|
||||
Reference in New Issue
Block a user