Skip to content

When error within 'test:after:run', Cypress hangs instead of throwing the error. #2271

@mjhea0

Description

@mjhea0

Current behavior:

test:after:run hangs

Steps to reproduce:

Sample test:

Cypress.on('test:after:run', () => {
  throw new Error('foo');
});

describe('Test 2', () => {
  it('will send out request', ()  => {
    expect(true).to.eq(true);
  });
});

Meanwhile, this works fine:

Cypress.on('test:before:run', () => {
  throw new Error('foo');
});

describe('Test 1', () => {
  it('will send out request', ()  => {
    expect(true).to.eq(true);
  });
});

What am I missing?

Versions

  • Operating System: Mac OS 10.12.6
  • Cypress Version: 3.0.3
  • Browser Version: Chrome 68.0.3440.75

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions