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

use correct values for subscriptionKey and endpointKey for qna services #1301

Merged
merged 6 commits into from
Feb 6, 2019

Conversation

a-b-r-o-w-n
Copy link
Contributor

@a-b-r-o-w-n a-b-r-o-w-n commented Feb 6, 2019

closes #1286
closes #1287
closes #1289

Fixed

  • [main] use correct values for subscriptionKey and endpointKey for qna services, in PR #1301
  • [client] fix link to manage qna service, in PR #1301

With the client already running, run `Electron: Main` debug command in vscode to enable breakpoints in the typescript.

NOTE: `npm run build:electron` needs to be done after making any changes to the typescript or else the breakpoints will not work correctly.
@coveralls
Copy link

coveralls commented Feb 6, 2019

Pull Request Test Coverage Report for Build 2011

  • 14 of 14 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 50.41%

Totals Coverage Status
Change from base Build 2002: 0.01%
Covered Lines: 4512
Relevant Lines: 8354

💛 - Coveralls

@justinwilaby
Copy link
Contributor

@a-b-r-o-w-n - You might be able to cover the continuation in the loop thusly:

let success = 100
const mockArgsPassedToFetch = [];
let mockResponses;
jest.mock('node-fetch', () => {
  const fetch = (url, headers) => {
    mockArgsPassedToFetch.push({ url, headers });
    return {
      ok: (--success > 0),
      json: async () => mockResponses.shift(),
      text: async () => mockResponses.shift(),
    };
  };
  (fetch as any).Headers = class {};
  (fetch as any).Response = class {};
  return fetch;
});

...
it('should skip over responses that do not succeed', () => {
  success = 1;
 // do stuff
 expect(result.services.length).toBe(1);
});

@a-b-r-o-w-n
Copy link
Contributor Author

@justinwilaby That's a good idea. I have another implementation that I just wrapped up. I'll push it once I see that there is coverage for that line.

"env": {
"NODE_ENV": "development"
"NODE_ENV": "development",
"ELECTRON_TARGET_URL": "http://localhost:3000/"
},
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@a-b-r-o-w-n a-b-r-o-w-n merged commit e067cbf into microsoft:master Feb 6, 2019
@a-b-r-o-w-n a-b-r-o-w-n deleted the fix-qna-bot-file branch February 6, 2019 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants