This commit is contained in:
Pavel Murygin 2022-02-22 21:28:03 +03:00
parent 2fc15f36bc
commit 4e1d276d4a
3 changed files with 7 additions and 2 deletions

View File

@ -36,7 +36,7 @@ describe('smoke test', () => {
await page.goto(uri);
console.log('waiting for fluence to connect...');
await page.waitForTimeout(1000);
await page.waitForTimeout(2000);
console.log('clicking button...');
await page.click('#btn');

View File

@ -1,4 +1,4 @@
import { runServer } from '../main';
import { justStop, runServer } from '../main';
import { demoCalculation } from '../_aqua/demo-calculation';
describe('smoke test', () => {
@ -6,6 +6,7 @@ describe('smoke test', () => {
await runServer();
const res = await demoCalculation();
await justStop();
expect(res).toBe(7);
}, 15000);

View File

@ -48,6 +48,10 @@ export async function runServer() {
console.log('press any key to quit...');
}
export async function justStop() {
await Fluence.stop();
}
export async function waitForKeypressAndStop() {
process.stdin.setRawMode(true);
process.stdin.resume();