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

[Engineering] Lower time for BotBuilder-core tests #2604

Merged

Conversation

ceciliaavila
Copy link
Collaborator

Address #2338

Description

This pull request updates tests in the BotBuilder-Core library to remove unused variables, re-arrange resources, and remove duplicated tests to reduce time.

Specific Changes

autoSaveStateMiddleware.test.js:

  • Moved reusable variables fooState and barState instead of creating them for each test.
  • Fixed eslint warnings.

botState.test.js:

  • Removed superfluous test.
  • Fixed eslint warnings.

conversationState.test.js:

  • Removed unused endOfConversation variable.
  • Fixed eslint warnings.

memoryStorage.test.js:

  • Removed unnecessary storage variable already parsed when using testStorage function. The default is never used as it already parse a new MemoryStorage in line 74.

memoryTranscriptStore.test.js:

  • Moved storage variable to be reused.
  • Fixed eslint warnings.

privateConversationState.test.js:

  • Removed unused endOfConversation variable.
  • Removed unnecessary key variable declaration.
  • Fixed eslint warnings.

showTypingMiddleware.test.js:

  • Remove unused receivedMessage variable.
  • Fixed eslint warnings.

testAdapter.test.js:

  • Removed unused start variable in multiple tests.
  • Fixed eslint warnings.

Testing

As you see in the next images, the time for the tests decreased approximately 1 second and the code coverage did not decrease.
image
image

@stevengum stevengum merged commit f7425c5 into microsoft:master Jul 29, 2020
@ceciliaavila ceciliaavila deleted the southworks/update/botbuilder-core-tests branch July 29, 2020 18:16
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.

4 participants