diff --git a/package.json b/package.json index 7317989..3841325 100644 --- a/package.json +++ b/package.json @@ -42,4 +42,4 @@ "npmextra.json", "readme.md" ] -} +} \ No newline at end of file diff --git a/test/test.ts b/test/test.ts index 29688d8..62616dd 100644 --- a/test/test.ts +++ b/test/test.ts @@ -3,22 +3,21 @@ import { tap, expect } from '@pushrocks/tapbundle'; import * as smartbrowser from '../ts/index'; let testSmartBrowser: smartbrowser.SmartBrowser; -tap - .test('should instanstiate a new browser ', async () => { - testSmartBrowser = new smartbrowser.SmartBrowser(); - return expect(testSmartBrowser).to.be.instanceof(smartbrowser.SmartBrowser); - }) +tap.test('should instanstiate a new browser ', async () => { + testSmartBrowser = new smartbrowser.SmartBrowser(); + return expect(testSmartBrowser).to.be.instanceof(smartbrowser.SmartBrowser); +}); tap.test('should start the browser ', async () => { await expect(testSmartBrowser.start()).to.eventually.be.fulfilled; }); -tap.test('should create a PDF from a page', async (tools) => { +tap.test('should create a PDF from a page', async tools => { const result = await testSmartBrowser.pdfFromPage('https://lossless.com'); expect(result.buffer).to.be.instanceOf(Buffer); }); -tap.test('should produce a valid screenshot', async (tools) => { +tap.test('should produce a valid screenshot', async tools => { const result = await testSmartBrowser.screenshotFromPage('https://lossless.com'); expect(result.buffer).to.be.instanceOf(Buffer); }); diff --git a/ts/index.ts b/ts/index.ts index c494917..fcd22bb 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -20,7 +20,7 @@ export class SmartBrowser { /** * make a screenshot from a page - * @param urlArg + * @param urlArg */ public async screenshotFromPage(urlArg: string): Promise { const pageId = plugins.smartunique.shortId(); @@ -41,10 +41,10 @@ export class SmartBrowser { /** * evalutes an expression on a page - * @param urlArg - * @param funcArg + * @param urlArg + * @param funcArg */ - public async evaluateOnPage (urlArg: string, funcArg: () => Promise) { + public async evaluateOnPage(urlArg: string, funcArg: () => Promise) { const page = await this.headlessBrowser.newPage(); await page.goto(urlArg, { waitUntil: 'networkidle2' @@ -63,7 +63,6 @@ export class SmartBrowser { }); this.smartpdf = new plugins.smartpdf.SmartPdf(); await this.smartpdf.start(this.headlessBrowser); - } /** diff --git a/ts/interfaces/index.ts b/ts/interfaces/index.ts index 8fae789..52507ff 100644 --- a/ts/interfaces/index.ts +++ b/ts/interfaces/index.ts @@ -1,2 +1 @@ export * from './interfaces.screenshotresult'; -