diff --git a/aqua-examples/aqua-ipfs-integration/web/src/__test__/test.spec.ts b/aqua-examples/aqua-ipfs-integration/web/src/__test__/test.spec.ts index 68fa3b9..baf1f38 100644 --- a/aqua-examples/aqua-ipfs-integration/web/src/__test__/test.spec.ts +++ b/aqua-examples/aqua-ipfs-integration/web/src/__test__/test.spec.ts @@ -3,29 +3,28 @@ import http from 'http'; import path from 'path'; const port = 3001; -const uri = `http://localhost:${port}/` +const uri = `http://localhost:${port}/`; const publicPath = path.join(__dirname, '../../build/'); console.log(publicPath); const server = http.createServer((request, response) => { return handler(request, response, { - public: publicPath - }); -}) + public: publicPath, + }); +}); const startServer = async () => { return new Promise((resolve: any) => { server.listen(port, resolve); - }) -} + }); +}; const stopServer = async () => { return new Promise((resolve: any) => { server.close(resolve); - }) -} - + }); +}; describe('smoke test', () => { beforeAll(startServer); @@ -38,10 +37,10 @@ describe('smoke test', () => { console.log('clicking connect button...'); await page.click('.btn-connect'); - + console.log('waiting for fluence to connect...'); await page.waitForTimeout(1000); - + console.log('waiting for "deploy service" button to appear...'); await page.waitForSelector('#deploy-service'); @@ -56,9 +55,9 @@ describe('smoke test', () => { console.log('waiting for result to appear...'); const sizeEl = await page.waitForSelector('#file-size'); - - const size = await sizeEl?.evaluate(x => x.textContent); - expect(size).toBe("144804"); - }, 10000); + const size = await sizeEl?.evaluate((x) => x.textContent); + + expect(size).toBe('144804'); + }, 15000); }); diff --git a/aqua-examples/echo-greeter/client-peer/src/__test__/test.spec.ts b/aqua-examples/echo-greeter/client-peer/src/__test__/test.spec.ts index 45db962..ab077b5 100644 --- a/aqua-examples/echo-greeter/client-peer/src/__test__/test.spec.ts +++ b/aqua-examples/echo-greeter/client-peer/src/__test__/test.spec.ts @@ -30,5 +30,5 @@ describe('smoke test', () => { 'Hi, Jake', 'Bye, Jake', ]); - }, 10000); + }, 15000); }); diff --git a/aqua-examples/price-oracle/client-peer/src/__test__/test.spec.ts b/aqua-examples/price-oracle/client-peer/src/__test__/test.spec.ts index 61d1040..aaa4968 100644 --- a/aqua-examples/price-oracle/client-peer/src/__test__/test.spec.ts +++ b/aqua-examples/price-oracle/client-peer/src/__test__/test.spec.ts @@ -17,5 +17,5 @@ describe('smoke test', () => { result: expect.any(Number), success: true, }); - }, 10000); + }, 15000); }); diff --git a/aqua-examples/price-oracle/web/src/__test__/test.spec.ts b/aqua-examples/price-oracle/web/src/__test__/test.spec.ts index 2f2ac5c..3199208 100644 --- a/aqua-examples/price-oracle/web/src/__test__/test.spec.ts +++ b/aqua-examples/price-oracle/web/src/__test__/test.spec.ts @@ -3,29 +3,28 @@ import http from 'http'; import path from 'path'; const port = 3000; -const uri = `http://localhost:${port}/` +const uri = `http://localhost:${port}/`; const publicPath = path.join(__dirname, '../../build/'); console.log(publicPath); const server = http.createServer((request, response) => { return handler(request, response, { - public: publicPath - }); -}) + public: publicPath, + }); +}); const startServer = async () => { return new Promise((resolve: any) => { server.listen(port, resolve); - }) -} + }); +}; const stopServer = async () => { return new Promise((resolve: any) => { server.close(resolve); - }) -} - + }); +}; describe('smoke test', () => { beforeAll(startServer); @@ -48,6 +47,6 @@ describe('smoke test', () => { console.log('getting the content of price div...'); const content = await elem?.evaluate((x) => x.textContent); - expect(content).toMatch("The price is:") - }, 10000); + expect(content).toMatch('The price is:'); + }, 15000); }); diff --git a/fluence-js-examples/browser-example/src/__test__/test.spec.ts b/fluence-js-examples/browser-example/src/__test__/test.spec.ts index cef8e73..f8124a2 100644 --- a/fluence-js-examples/browser-example/src/__test__/test.spec.ts +++ b/fluence-js-examples/browser-example/src/__test__/test.spec.ts @@ -3,29 +3,28 @@ import http from 'http'; import path from 'path'; const port = 3000; -const uri = `http://localhost:${port}/` +const uri = `http://localhost:${port}/`; const publicPath = path.join(__dirname, '../../build/'); console.log(publicPath); const server = http.createServer((request, response) => { return handler(request, response, { - public: publicPath - }); -}) + public: publicPath, + }); +}); const startServer = async () => { return new Promise((resolve: any) => { server.listen(port, resolve); - }) -} + }); +}; const stopServer = async () => { return new Promise((resolve: any) => { server.close(resolve); - }) -} - + }); +}; describe('smoke test', () => { beforeAll(startServer); @@ -49,5 +48,5 @@ describe('smoke test', () => { const content = await elem?.evaluate((x) => x.textContent); expect(content?.length).toBeGreaterThan(10); - }, 10000); + }, 15000); }); diff --git a/fluence-js-examples/hello-world/src/__test__/test.spec.ts b/fluence-js-examples/hello-world/src/__test__/test.spec.ts index f2a244b..ee01f4c 100644 --- a/fluence-js-examples/hello-world/src/__test__/test.spec.ts +++ b/fluence-js-examples/hello-world/src/__test__/test.spec.ts @@ -10,5 +10,5 @@ describe('smoke test', () => { expect(console.log).toHaveBeenNthCalledWith(1, 'Hello, world!'); expect(console.log).toHaveBeenNthCalledWith(2, 'Wealth awaits you very soon.'); expect(console.log).toHaveBeenNthCalledWith(3, 'The relay time is: ', expect.anything()); - }, 10000); + }, 15000); }); diff --git a/fluence-js-examples/node-example/src/__test__/test.spec.ts b/fluence-js-examples/node-example/src/__test__/test.spec.ts index ddb0c8d..d39ac86 100644 --- a/fluence-js-examples/node-example/src/__test__/test.spec.ts +++ b/fluence-js-examples/node-example/src/__test__/test.spec.ts @@ -8,5 +8,5 @@ describe('smoke test', () => { const res = await demoCalculation(); expect(res).toBe(7); - }, 10000); + }, 15000); }); diff --git a/quickstart/1-browser-to-browser/src/__test__/test.spec.ts b/quickstart/1-browser-to-browser/src/__test__/test.spec.ts index cfdec65..264815e 100644 --- a/quickstart/1-browser-to-browser/src/__test__/test.spec.ts +++ b/quickstart/1-browser-to-browser/src/__test__/test.spec.ts @@ -4,28 +4,28 @@ import http from 'http'; import path from 'path'; const port = 3000; -const uri = `http://localhost:${port}/` +const uri = `http://localhost:${port}/`; const publicPath = path.join(__dirname, '../../build/'); console.log(publicPath); const server = http.createServer((request, response) => { return handler(request, response, { - public: publicPath - }); -}) + public: publicPath, + }); +}); const startServer = async () => { return new Promise((resolve: any) => { server.listen(port, resolve); - }) -} + }); +}; const stopServer = async () => { return new Promise((resolve: any) => { server.close(resolve); - }) -} + }); +}; const peerIdLength = '12D3KooWM2CYSHefG6KPKbYFAgsbPh8p6b8HYHc6VNkge2rPtYv5'.length; @@ -100,5 +100,5 @@ describe('smoke test', () => { expect(page1Message).toBe('Hello back to you, ' + peerRelay1.peerId); expect(page2Message).toBe('Hello from: ' + peerRelay1.peerId); - }, 10000); + }, 15000); }); diff --git a/quickstart/3-browser-to-service/src/__test__/test.spec.ts b/quickstart/3-browser-to-service/src/__test__/test.spec.ts index d7c553f..8ad1a18 100644 --- a/quickstart/3-browser-to-service/src/__test__/test.spec.ts +++ b/quickstart/3-browser-to-service/src/__test__/test.spec.ts @@ -4,28 +4,28 @@ import http from 'http'; import path from 'path'; const port = 3000; -const uri = `http://localhost:${port}/` +const uri = `http://localhost:${port}/`; const publicPath = path.join(__dirname, '../../build/'); console.log(publicPath); const server = http.createServer((request, response) => { return handler(request, response, { - public: publicPath - }); -}) + public: publicPath, + }); +}); const startServer = async () => { return new Promise((resolve: any) => { server.listen(port, resolve); - }) -} + }); +}; const stopServer = async () => { return new Promise((resolve: any) => { server.close(resolve); - }) -} + }); +}; const peerIdLength = '12D3KooWM2CYSHefG6KPKbYFAgsbPh8p6b8HYHc6VNkge2rPtYv5'.length; const loadApp = async (page: Page) => { @@ -99,5 +99,5 @@ describe('smoke test', () => { expect(page1Message).toBe('Hello back to you, ' + peerRelay1.peerId); expect(page2Message).toBe('Hello from: ' + peerRelay1.peerId); - }, 10000); + }, 15000); });