Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Guide] creating a promise and continue to run steps async #85

Closed
@marcoscaceres

Description

@marcoscaceres

Usually, when we write async stuff in specs we do something like this:

The steps to do a foopy are given by the following algorithm. The algorithm runs asynchronously and returns a Promise:

  1. Letp be a newly-created promise.
  2. Returnp and run the remaining steps asynchronously.
  3. If the foopy is not bary enough, then:
  • 3.1. Lete be a new Error...
  • 3.2. Rejectp withe
  1. Resolvep with a new Baz

In the examples given in the spec writing guide, step 2 is omitted. Is this on purpose? Or is doing something like 2. wrong and specs should be written differently?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2026 Movatter.jp