Clean up some stuff based on feedback

This commit is contained in:
Jon Bockhorst
2020-02-12 16:00:21 -06:00
parent 391313cd39
commit 2442dc09b0
9 changed files with 46 additions and 36 deletions
@@ -16,7 +16,7 @@ const width = 800;
const height = 600;
describe('AttachAddon', () => {
before(async function (): Promise<any> {
before(async function(): Promise<any> {
this.timeout(20000);
browser = await getBrowserType().launch({
headless: process.argv.indexOf('--headless') !== -1,
@@ -30,12 +30,12 @@ describe('AttachAddon', () => {
await browser.close();
});
beforeEach(async function (): Promise<any> {
beforeEach(async function(): Promise<any> {
this.timeout(20000);
await page.goto(APP);
});
it('string', async function (): Promise<any> {
it('string', async function(): Promise<any> {
this.timeout(20000);
await openTerminal({ rendererType: 'dom' });
const port = 8080;
@@ -46,7 +46,7 @@ describe('AttachAddon', () => {
server.close();
});
it('utf8', async function (): Promise<any> {
it('utf8', async function(): Promise<any> {
this.timeout(20000);
await openTerminal({ rendererType: 'dom' });
const port = 8080;
@@ -16,10 +16,10 @@ let page: playwright.Page;
const width = 800;
const height = 600;
describe('Search Tests', function (): void {
describe('Search Tests', function(): void {
this.timeout(20000);
before(async function (): Promise<any> {
before(async function(): Promise<any> {
browser = await getBrowserType().launch({
headless: process.argv.indexOf('--headless') !== -1,
args: [`--window-size=${width},${height}`, `--no-sandbox`]
@@ -15,7 +15,7 @@ const width = 800;
const height = 600;
describe('SerializeAddon', () => {
before(async function (): Promise<any> {
before(async function(): Promise<any> {
browser = await getBrowserType().launch({
headless: process.argv.indexOf('--headless') !== -1,
args: [`--window-size=${width},${height}`]
@@ -33,13 +33,13 @@ describe('SerializeAddon', () => {
after(async () => await browser.close());
beforeEach(async () => await page.evaluate(`window.term.reset()`));
it('empty content', async function (): Promise<any> {
it('empty content', async function(): Promise<any> {
const rows = 10;
const cols = 10;
assert.equal(await page.evaluate(`serializeAddon.serialize();`), '');
});
it('trim last empty lines', async function (): Promise<any> {
it('trim last empty lines', async function(): Promise<any> {
const cols = 10;
const lines = [
'',
@@ -58,7 +58,7 @@ describe('SerializeAddon', () => {
assert.equal(await page.evaluate(`serializeAddon.serialize();`), lines.slice(0, 8).join('\r\n'));
});
it('digits content', async function (): Promise<any> {
it('digits content', async function(): Promise<any> {
const rows = 10;
const cols = 10;
const digitsLine = digitsString(cols);
@@ -67,7 +67,7 @@ describe('SerializeAddon', () => {
assert.equal(await page.evaluate(`serializeAddon.serialize();`), lines.join('\r\n'));
});
it('serialize half rows of content', async function (): Promise<any> {
it('serialize half rows of content', async function(): Promise<any> {
const rows = 10;
const halfRows = rows >> 1;
const cols = 10;
@@ -76,7 +76,7 @@ describe('SerializeAddon', () => {
assert.equal(await page.evaluate(`serializeAddon.serialize(${halfRows});`), lines.slice(halfRows, 2 * halfRows).join('\r\n'));
});
it('serialize 0 rows of content', async function (): Promise<any> {
it('serialize 0 rows of content', async function(): Promise<any> {
const rows = 10;
const cols = 10;
const lines = newArray<string>((index: number) => digitsString(cols, index), rows);
@@ -84,7 +84,7 @@ describe('SerializeAddon', () => {
assert.equal(await page.evaluate(`serializeAddon.serialize(0);`), '');
});
it('serialize all rows of content with color16', async function (): Promise<any> {
it('serialize all rows of content with color16', async function(): Promise<any> {
const cols = 10;
const color16 = [
30, 31, 32, 33, 34, 35, 36, 37, // Set foreground color
@@ -101,7 +101,7 @@ describe('SerializeAddon', () => {
assert.equal(await page.evaluate(`serializeAddon.serialize();`), lines.join('\r\n'));
});
it('serialize all rows of content with fg/bg flags', async function (): Promise<any> {
it('serialize all rows of content with fg/bg flags', async function(): Promise<any> {
const cols = 10;
const line = '+'.repeat(cols);
const lines: string[] = [
@@ -122,7 +122,7 @@ describe('SerializeAddon', () => {
assert.equal(await page.evaluate(`serializeAddon.serialize();`), lines.join('\r\n'));
});
it('serialize all rows of content with color256', async function (): Promise<any> {
it('serialize all rows of content with color256', async function(): Promise<any> {
const rows = 32;
const cols = 10;
const lines = newArray<string>(
@@ -133,7 +133,7 @@ describe('SerializeAddon', () => {
assert.equal(await page.evaluate(`serializeAddon.serialize();`), lines.join('\r\n'));
});
it('serialize all rows of content with color16 and style separately', async function (): Promise<any> {
it('serialize all rows of content with color16 and style separately', async function(): Promise<any> {
const cols = 10;
const line = '+'.repeat(cols);
const lines: string[] = [
@@ -152,7 +152,7 @@ describe('SerializeAddon', () => {
assert.equal(await page.evaluate(`serializeAddon.serialize();`), lines.join('\r\n'));
});
it('serialize all rows of content with color16 and style together', async function (): Promise<any> {
it('serialize all rows of content with color16 and style together', async function(): Promise<any> {
const cols = 10;
const line = '+'.repeat(cols);
const lines: string[] = [
@@ -174,7 +174,7 @@ describe('SerializeAddon', () => {
assert.equal(await page.evaluate(`serializeAddon.serialize();`), lines.join('\r\n'));
});
it('serialize all rows of content with color256 and style separately', async function (): Promise<any> {
it('serialize all rows of content with color256 and style separately', async function(): Promise<any> {
const cols = 10;
const line = '+'.repeat(cols);
const lines: string[] = [
@@ -193,7 +193,7 @@ describe('SerializeAddon', () => {
assert.equal(await page.evaluate(`serializeAddon.serialize();`), lines.join('\r\n'));
});
it('serialize all rows of content with color256 and style together', async function (): Promise<any> {
it('serialize all rows of content with color256 and style together', async function(): Promise<any> {
const cols = 10;
const line = '+'.repeat(cols);
const lines: string[] = [
@@ -215,7 +215,7 @@ describe('SerializeAddon', () => {
assert.equal(await page.evaluate(`serializeAddon.serialize();`), lines.join('\r\n'));
});
it('serialize all rows of content with colorRGB and style separately', async function (): Promise<any> {
it('serialize all rows of content with colorRGB and style separately', async function(): Promise<any> {
const cols = 10;
const line = '+'.repeat(cols);
const lines: string[] = [
@@ -234,7 +234,7 @@ describe('SerializeAddon', () => {
assert.equal(await page.evaluate(`serializeAddon.serialize();`), lines.join('\r\n'));
});
it('serialize all rows of content with colorRGB and style together', async function (): Promise<any> {
it('serialize all rows of content with colorRGB and style together', async function(): Promise<any> {
const cols = 10;
const line = '+'.repeat(cols);
const lines: string[] = [
@@ -15,7 +15,7 @@ const width = 800;
const height = 600;
describe('Unicode11Addon', () => {
before(async function (): Promise<any> {
before(async function(): Promise<any> {
this.timeout(20000);
browser = await getBrowserType().launch({
headless: process.argv.indexOf('--headless') !== -1,
@@ -29,7 +29,7 @@ describe('Unicode11Addon', () => {
await browser.close();
});
beforeEach(async function (): Promise<any> {
beforeEach(async function(): Promise<any> {
this.timeout(20000);
await page.goto(APP);
await openTerminal();
@@ -15,7 +15,7 @@ const width = 800;
const height = 600;
describe('WebLinksAddon', () => {
before(async function (): Promise<any> {
before(async function(): Promise<any> {
this.timeout(10000);
browser = await getBrowserType().launch({
headless: process.argv.indexOf('--headless') !== -1,
@@ -29,22 +29,22 @@ describe('WebLinksAddon', () => {
await browser.close();
});
beforeEach(async function (): Promise<any> {
beforeEach(async function(): Promise<any> {
this.timeout(5000);
await page.goto(APP);
});
it('.com', async function (): Promise<any> {
it('.com', async function(): Promise<any> {
this.timeout(20000);
await testHostName('foo.com');
});
it('.com.au', async function (): Promise<any> {
it('.com.au', async function(): Promise<any> {
this.timeout(20000);
await testHostName('foo.com.au');
});
it('.io', async function (): Promise<any> {
it('.io', async function(): Promise<any> {
this.timeout(20000);
await testHostName('foo.io');
});