jest-puppeteer on bitbucket / no exit, stuck on success

455 Views Asked by At

Running jest-puppeteer with the following express config :

import express from "express";
import path from "path";
import webpack from 'webpack';

import config from '../webpack.config';

const port = 3200;
const app = express();
const compiler = webpack(config);

app.use(require('webpack-dev-middleware')(compiler, {
  noInfo: true,
  publicPath: config.output.publicPath
}));

app.listen(port, function (error) {
  if(error) console.log(error);
});

with the following simple test :

describe('Google', () => {
  beforeAll(async () => {
    await page.goto('http://localhost:3200')
  })

  it('should display "demo" text on page', async (done) => {
    await expect(page).toMatch('Your cart');

    done();
  });
});

The jest-puppeteer config is the following :

module.exports = {
  server: {
    command: './node_modules/babel-watch/babel-watch.js ./test/server.js',
    port: 3200,
  },
};

I'm having trouble on my bitbucket pipeline; all tests are passing but the commands never exits

What would be the reason for it being stuck ? Is the webpack conf involved ?

Just ran the very same test scripts on semaphore, everything works smoothly

thx a lot for any advised answers

0

There are 0 best solutions below