Skip to content

E2E tests are timing out #1145

@matdec01

Description

@matdec01

Stencil version:

@stencil/core@0.13.2

I'm submitting a:

[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/

Current behavior:
An UnhandledPromiseRejectionWarning error is raised when running the E2E tests, which causes a timeout.

Expected behavior:
The E2E tests do not time out.

Steps to reproduce:

> stencil test --e2e

[40:28.6]  @stencil/core v0.13.2 ⚡️
[40:28.6]  testing e2e files
[40:28.6]  build, design-system, dev mode, started ...
[40:28.8]  module map started ...
[40:28.8]  generate styles started ...
[40:28.8]  module map finished in 1 ms
[40:28.8]  module derive started ...
[40:28.8]  module derive finished in 1 ms
[40:29.2]  generate styles finished in 378 ms
[40:29.2]  generate app files started ...
[40:29.3]  generate app files finished in 59 ms
[40:29.9]  build finished in 1.22 s

FAIL  src/components/test.e2e.ts (15.862s)
  foo
    ✕ bar (15077ms)

  ● foo › bar

    Timeout - Async callback was not invoked within the 15000ms timeout specified by jest.setTimeout.

      3 | describe('foo', () => {
      4 | 
    > 5 |   it('bar', async () => {
        |   ^
      6 |     const page = await newE2EPage();
      7 |     await page.setContent(`<div>test</div>`);
      8 |   });

      at Spec (node_modules/jest-jasmine2/build/jasmine/Spec.js:85:20)
      at Suite.Object.<anonymous>.describe (src/components/test.e2e.ts:5:3)

  console.error node_modules/@stencil/core/dist/testing/index.js:6685
    e2eSetContent: Error: Protocol error (Runtime.callFunctionOn): Target closed.

Test Suites: 1 failed, 1 total
Tests:       1 failed, 1 total
Snapshots:   0 total
Time:        16.189s, estimated 17s
Ran all test suites.

Related code:

import { newE2EPage } from '@stencil/core/testing';

describe('foo', () => {

  it('bar', async () => {
    const page = await newE2EPage();
    await page.setContent(`<div>test</div>`);
  });
});

Other information:

npm@6.4.1
node@v10.12.0

NPM log:

3 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack     at EventEmitter.emit (events.js:182:13)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:182:13)
13 verbose stack     at maybeClose (internal/child_process.js:962:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions