Merge pull request #2256 from Tyriar/tests

Fix composition tests
This commit is contained in:
Daniel Imms
2019-06-23 14:27:42 -07:00
committed by GitHub
+5 -4
View File
@@ -44,9 +44,6 @@ describe('CompositionHelper', () => {
return { offsetLeft: 0, offsetTop: 0 };
}
},
handler: (text: string) => {
handledText += text;
},
buffer: {
isCursorInViewport: true
},
@@ -54,8 +51,12 @@ describe('CompositionHelper', () => {
lineHeight: 1
}
} as any;
const coreService = new MockCoreService();
coreService.triggerDataEvent = (text: string) => {
handledText += text;
};
handledText = '';
compositionHelper = new CompositionHelper(textarea, compositionView, terminal, new MockCharSizeService(10, 10), new MockCoreService());
compositionHelper = new CompositionHelper(textarea, compositionView, terminal, new MockCharSizeService(10, 10), coreService);
});
describe('Input', () => {