Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

These questions are missing in src/07_promise.test.js, but in the solution. #3

Open
wisteria-hill-technologies opened this issue Apr 12, 2018 · 0 comments

Comments

@wisteria-hill-technologies
Copy link
Contributor

wisteria-hill-technologies commented Apr 12, 2018

The below questions are missing in src/07_promise.test.js in master branch, but exist in the solution.
Do we want to add them to the master branch? or remove them from the solution branch?

it('the `resolve` function can return a value, that is consumed by the `promise.then()` callback', (done) => {
      let promise = new Promise((resolve) => {
        resolve()
      })

      promise
        .then(value => {
          expect(value).toEqual(42)
          done()
        })
        .catch(() => done(new Error('The promise is expected to resolve with 42!')))
    })

also

it('is rejected if one rejects', (done) => {
      const promise = Promise.all([
        new Promise((resolve, reject) => reject(1))
      ])

      promise
        .then(() => {
          const err = new NotRejectedError()
          console.log(err)
          done()
        })
        .catch(() => done())
    })
@wisteria-hill-technologies wisteria-hill-technologies changed the title This question is missing in src/07_promise.test.js, but in the solution. These questions are missing in src/07_promise.test.js, but in the solution. Apr 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant