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

spec: update auto-updater spec to expect #13237

Merged
merged 3 commits into from Jun 16, 2018

Conversation

Projects
None yet
3 participants
@codebytere
Member

codebytere commented Jun 13, 2018

Ongoing work to migrate our specs from assert to chai's expect for better error messages.

This PR updates the auto-updater spec.

/cc @alexeykuzmin

@codebytere codebytere requested review from electron/reviewers as code owners Jun 13, 2018

@alexeykuzmin

Do you have to change spec/package-lock.json? )

Show outdated Hide outdated spec/api-auto-updater-spec.js
Show outdated Hide outdated spec/api-auto-updater-spec.js
Show outdated Hide outdated spec/api-auto-updater-spec.js
assert.deepEqual(Object.getOwnPropertyNames(error), ['stack', 'message', 'name'])
autoUpdater.once('error', error => {
expect(error).to.be.an.instanceof(Error)
expect(Object.getOwnPropertyNames(error)).to.deep.equal(['stack', 'message', 'name'])

This comment has been minimized.

@alexeykuzmin

alexeykuzmin Jun 14, 2018

Contributor

Might this be slightly more readable?

expect(error).to.have.all.keys(['message', 'name', 'stack'])
@alexeykuzmin

alexeykuzmin Jun 14, 2018

Contributor

Might this be slightly more readable?

expect(error).to.have.all.keys(['message', 'name', 'stack'])

codebytere added some commits Jun 14, 2018

@codebytere codebytere changed the title from spec: update auto-updater to expect to spec: update auto-updater spec to expect Jun 14, 2018

leaving outstanding suggestion as-is following slack discussion

@codebytere codebytere merged commit a0d2528 into master Jun 16, 2018

11 checks passed

WIP ready for review
Details
ci/circleci: electron-linux-arm Your tests passed on CircleCI!
Details
ci/circleci: electron-linux-arm-test Your tests passed on CircleCI!
Details
ci/circleci: electron-linux-arm64 Your tests passed on CircleCI!
Details
ci/circleci: electron-linux-arm64-test Your tests passed on CircleCI!
Details
ci/circleci: electron-linux-ia32 Your tests passed on CircleCI!
Details
ci/circleci: electron-linux-x64 Your tests passed on CircleCI!
Details
ci/circleci: electron-mas-x64 Your tests passed on CircleCI!
Details
ci/circleci: electron-osx-x64 Your tests passed on CircleCI!
Details
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@codebytere codebytere deleted the expect-auto-updater-spec branch Jun 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment