-
Notifications
You must be signed in to change notification settings - Fork 233
Closed
Labels
Description
Bug Report
Prerequisites
- Can you reproduce the problem?
- Are you running the latest version?
- Are you reporting to the correct repository?
- Did you perform a cursory search?
For more information, see the CONTRIBUTING guide.
Description
Test failed when I upgraded SDK version from 2.2.1 to 3.0.0.
Console Errors: TypeError: Cannot redefine property: BatchResponseContent
Steps to Reproduce
- Create a new project.
npm init - Install packages.
@microsoft/[email protected]@types/[email protected][email protected][email protected][email protected]
- Write a test script.
index.test.ts
import * as microsoftGraph from '@microsoft/microsoft-graph-client';
it('test', () => {
jest.spyOn(microsoftGraph, 'BatchResponseContent');
});
Expected behavior: Test passed.
Actual behavior: Test failed because cannot mock BatchResponseContent.
Additional Context
It works with @microsoft/[email protected]. Was it any changes?
Usage Information
Request ID - Value of the requestId field if you are receiving a Graph API error response
SDK Version - 3.0.0
- Node (Check, if using Node version of SDK)
Node Version - 14.17.6
- Browser (Check, if using Browser version of SDK)
Browser Name - [The name of Browser that you are using for SDK]
Version - [The version of the browser you are using]