Skip to content

Allow tests to return a Promise #632

@JamesMGreene

Description

@JamesMGreene

Split out from #534.

Details:

  • Return a promise from a test
  • That promise should be automatically asserted to fulfill
  • Automatic async start/stop

Usage:

QUnit.test("promises promises...", function(assert) {
  assert.expect(1);
  return $.ajax("/api/blah");
});

Plan is to use a similar patch to what @domenic mentioned doing for Mocha: #534 (comment)

CC: @stefanpenner @domenic

Metadata

Metadata

Assignees

Labels

Type: EnhancementNew idea or feature request.Type: MetaSeek input from maintainers and contributors.

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