Skip to content

Commit 7df020b

Browse files
wip. test checking
1 parent ce1f97e commit 7df020b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/devextreme-cli/testing/nextjs-server.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,22 @@ module.exports = class NextJsServer {
1010

1111
async start() {
1212
this.stop();
13-
console.log('----RUN STOP SERVER CMD------>');
13+
console.log('----RUN START SERVER CMD------>');
1414
({ proc: this.proc } = await runCommand('npm', ['run', 'start'], {
1515
cwd: this.env.appPath,
1616
detached: true
1717
}));
1818
}
1919

20-
stop() {
20+
async stop() {
2121
if(this.proc) {
2222
console.log('-----NEXTJS SERVER-STOP---->');
2323
this.proc.kill('SIGKILL');
2424

2525
if(process.platform !== 'win32') {
2626
try {
2727
execSync(`lsof -i :${this.port} -t | xargs kill -9`, { stdio: 'ignore' });
28+
await new Promise((resolve) => setTimeout(resolve, 1000));
2829
} catch(e) {
2930
console.log(`NextJs server on port ${this.port} not found. It's OK`);
3031
}

0 commit comments

Comments
 (0)