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

Replace done w/ async part 4 #3427

Merged
merged 5 commits into from
Mar 24, 2021

Conversation

mdrichardson
Copy link
Contributor

Partial fix for #3226. This will be done in multiple PRs.

Covers

(Alphabetically such that botbuilder comes before botbuilder-)

  • botbuilder-dialogs

Excludes

None

Description

Replaces the use of done() in tests with proper async/await.

Specific Changes

  • done => async/await
  • Remove some of the try/catches that are no longer needed since we don't need done(err)
  • Avoid arrow function in mocha tests
  • A lot of no-op stuff auto-fixes with our prettier/eslint settings

Notes (mostly for me)

  • Regex for finding done usage: (done =>)|\(done\)
  • Search in: ./libraries/**/**/tests/**/*.js
  • For adding await to adapter.send() calls: (?<!(await)|(const))\sadapter

@coveralls
Copy link

coveralls commented Mar 23, 2021

Pull Request Test Coverage Report for Build 683873092

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 5 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.03%) to 85.094%

Files with Coverage Reduction New Missed Lines %
libraries/botbuilder-lg/src/templateExtensions.ts 1 84.48%
libraries/adaptive-expressions/src/triggerTrees/node.ts 2 95.26%
libraries/adaptive-expressions/src/triggerTrees/trigger.ts 2 61.63%
Totals Coverage Status
Change from base Build 683871407: -0.03%
Covered Lines: 18771
Relevant Lines: 21006

💛 - Coveralls

}));
});

it('should default to english locale', async function () {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: This test wasn't deleted; it's the one above. The diff just looks weird.

@mdrichardson mdrichardson marked this pull request as ready for review March 23, 2021 23:14
@mdrichardson mdrichardson requested review from a team as code owners March 23, 2021 23:15
@joshgummersall joshgummersall merged commit 989aca5 into microsoft:main Mar 24, 2021
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

Successfully merging this pull request may close these issues.

3 participants