mirror of
https://github.com/fluencelabs/examples
synced 2025-04-25 10:42:16 +00:00
fixes
This commit is contained in:
parent
2fc15f36bc
commit
4e1d276d4a
@ -36,7 +36,7 @@ describe('smoke test', () => {
|
|||||||
await page.goto(uri);
|
await page.goto(uri);
|
||||||
|
|
||||||
console.log('waiting for fluence to connect...');
|
console.log('waiting for fluence to connect...');
|
||||||
await page.waitForTimeout(1000);
|
await page.waitForTimeout(2000);
|
||||||
|
|
||||||
console.log('clicking button...');
|
console.log('clicking button...');
|
||||||
await page.click('#btn');
|
await page.click('#btn');
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { runServer } from '../main';
|
import { justStop, runServer } from '../main';
|
||||||
import { demoCalculation } from '../_aqua/demo-calculation';
|
import { demoCalculation } from '../_aqua/demo-calculation';
|
||||||
|
|
||||||
describe('smoke test', () => {
|
describe('smoke test', () => {
|
||||||
@ -6,6 +6,7 @@ describe('smoke test', () => {
|
|||||||
await runServer();
|
await runServer();
|
||||||
|
|
||||||
const res = await demoCalculation();
|
const res = await demoCalculation();
|
||||||
|
await justStop();
|
||||||
|
|
||||||
expect(res).toBe(7);
|
expect(res).toBe(7);
|
||||||
}, 15000);
|
}, 15000);
|
||||||
|
@ -48,6 +48,10 @@ export async function runServer() {
|
|||||||
console.log('press any key to quit...');
|
console.log('press any key to quit...');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function justStop() {
|
||||||
|
await Fluence.stop();
|
||||||
|
}
|
||||||
|
|
||||||
export async function waitForKeypressAndStop() {
|
export async function waitForKeypressAndStop() {
|
||||||
process.stdin.setRawMode(true);
|
process.stdin.setRawMode(true);
|
||||||
process.stdin.resume();
|
process.stdin.resume();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user