Revert some formatting and remove puppeteer

This commit is contained in:
Jon Bockhorst
2020-02-11 13:32:55 -06:00
parent 8fb6ded506
commit 391313cd39
6 changed files with 260 additions and 275 deletions
+8 -8
View File
@@ -14,8 +14,8 @@ let page: Page;
const width = 800;
const height = 600;
describe('CharWidth Integration Tests', function (): void {
before(async function (): Promise<any> {
describe('CharWidth Integration Tests', function(): void {
before(async function(): Promise<any> {
browser = await getBrowserType().launch({
headless: process.argv.indexOf('--headless') !== -1,
args: [`--window-size=${width},${height}`, `--no-sandbox`]
@@ -35,37 +35,37 @@ describe('CharWidth Integration Tests', function (): void {
await page.evaluate(`window.term.reset()`);
});
it('ASCII chars', async function (): Promise<void> {
it('ASCII chars', async function(): Promise<void> {
const input = 'This is just ASCII text.#';
await page.evaluate(`window.term.write('${input}')`);
await pollFor(page, () => sumWidths(0, 1, '#'), 25);
});
it('combining chars', async function (): Promise<void> {
it('combining chars', async function(): Promise<void> {
const input = 'e\u0301e\u0301e\u0301e\u0301e\u0301e\u0301e\u0301e\u0301e\u0301#';
await page.evaluate(`window.term.write('${input}')`);
await pollFor(page, () => sumWidths(0, 1, '#'), 10);
});
it('surrogate chars', async function (): Promise<void> {
it('surrogate chars', async function(): Promise<void> {
const input = '𝄞𝄞𝄞𝄞𝄞𝄞𝄞𝄞𝄞𝄞𝄞𝄞𝄞𝄞𝄞𝄞𝄞𝄞𝄞𝄞𝄞𝄞𝄞𝄞𝄞𝄞𝄞#';
await page.evaluate(`window.term.write('${input}')`);
await pollFor(page, () => sumWidths(0, 1, '#'), 28);
});
it('surrogate combining chars', async function (): Promise<void> {
it('surrogate combining chars', async function(): Promise<void> {
const input = '𓂀\u0301𓂀\u0301𓂀\u0301𓂀\u0301𓂀\u0301𓂀\u0301𓂀\u0301𓂀\u0301𓂀\u0301𓂀\u0301𓂀\u0301#';
await page.evaluate(`window.term.write('${input}')`);
await pollFor(page, () => sumWidths(0, 1, '#'), 12);
});
it('fullwidth chars', async function (): Promise<void> {
it('fullwidth chars', async function(): Promise<void> {
const input = '1234567890#';
await page.evaluate(`window.term.write('${input}')`);
await pollFor(page, () => sumWidths(0, 1, '#'), 21);
});
it('fullwidth chars offset 1', async function (): Promise<void> {
it('fullwidth chars offset 1', async function(): Promise<void> {
const input = 'a1234567890#';
await page.evaluate(`window.term.write('${input}')`);
await pollFor(page, () => sumWidths(0, 1, '#'), 22);