Skip to content

Commit bcec01f

Browse files
Change with respect to the comments in the PR
1 parent 964581c commit bcec01f

File tree

11 files changed

+39
-36
lines changed

11 files changed

+39
-36
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ samples/typescript/graph-typings.d.ts
1919
samples/typescript/sample.js.map
2020
src/index.d.ts
2121

22-
spec/secrets.ts
23-
2422
spec/**/*.js
2523
spec/**/*.d.ts
2624
spec/**/*.js.map

samples/browser/index.html

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
<!DOCTYPE html>
22
<html>
3+
34
<head>
45
<title>Browser test</title>
56
<script type="text/javascript" src="../../lib/graph-js-sdk-web.js"></script>
67
<script type="text/javascript" src="secrets.js"></script>
78
<script type="text/javascript">
89
var client = MicrosoftGraph.Client.init({
910
debugLogging: true,
10-
authProvider: function(done) {
11+
authProvider: function (done) {
1112
done(null, SECRETS.ACCESS_TOKEN);
1213
}
1314
});
@@ -26,7 +27,7 @@
2627
// Example of downloading the user's profile photo and displaying it in an img tag
2728
client
2829
.api('/me/photo/$value')
29-
.responseType(MicrosoftGraph.ResponseType.BLOB)
30+
.responseType('blob')
3031
.get((err, res, rawResponse) => {
3132
if (err) throw err;
3233

@@ -57,20 +58,23 @@
5758
}
5859
</script>
5960
</head>
61+
6062
<body>
61-
<h2>Please check the Node.js sample for more examples on calling the Graph.</h2>
63+
<h2>Please check the Node.js sample for more examples on calling the Graph.</h2>
6264

63-
<p>
64-
By loading this page, we called /me endpoint on the Microsoft Graph. Open your browser's' JavaScript console to see the result!
65-
</p>
66-
<br>
67-
<p>Your user photo from /me/photo/$value:</p>
68-
<img id="profileImg" />
69-
<p>
70-
Also, you can update your profile picture:
71-
<input type="file" onchange="updateProfilePicture()"><br>
72-
</p>
73-
<br>
65+
<p>
66+
By loading this page, we called /me endpoint on the Microsoft Graph. Open your browser's' JavaScript console to see the result!
67+
</p>
68+
<br>
69+
<p>Your user photo from /me/photo/$value:</p>
70+
<img id="profileImg" />
71+
<p>
72+
Also, you can update your profile picture:
73+
<input type="file" onchange="updateProfilePicture()">
74+
<br>
75+
</p>
76+
<br>
7477

7578
</body>
79+
7680
</html>

spec/core/responseHandling.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import * as mocha from 'mocha'
66

77
import * as assert from 'assert';
88

9+
declare const describe, it;
10+
911
const _200_RES_BODY: any = { a: 1 };
1012
const _200_RES_INIT: ResponseInit = { status: 200 };
1113
const _200_RES: Response =

spec/core/urlGeneration.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { Client as GraphClient } from "../../src/index"
44

55
const client = GraphClient.init();
66

7+
declare const describe, it;
8+
79
let cases = [];
810

911
cases.push({

spec/core/urlParsing.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import {Client as GraphClient} from "../../src/index"
44

55
const client = GraphClient.init();
66

7+
declare const describe, it;
8+
79

810
let testCases = {
911
"/me": "https://graph.microsoft.com/v1.0/me",

spec/secrets.sample.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1+
/**
2+
* @file
3+
* Defines access token exporting structure
4+
*
5+
* To use authentication based(making real requests to the graph service) testing populate this access token's value and rename this fil as secrets.ts
6+
*/
17
export const AccessToken = "";

spec/tasks/LargeFileUploadTask.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import { assert } from "chai";
22
import { getClient } from "../test-helper";
33
import { LargeFileUploadTask } from "../../lib/src/LargeFileUploadTask";
44

5+
declare const describe, it;
6+
57
describe('Parsing Range', () => {
68
let name = "sample_image.jpg",
79
arrayBuffer = new ArrayBuffer(80000),

spec/types/OneNote.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
import { assert } from 'chai'
22

33
import { getClient, randomString } from "../test-helper"
4-
import { Notebook, OnenoteSection, OnenotePage } from '@microsoft/microsoft-graph-types-beta'
4+
import { Notebook, OnenoteSection, OnenotePage } from '@microsoft/microsoft-graph-types'
55
import * as fs from "fs";
66
import * as FormData from "form-data";
77

88
declare const describe, it;
99

1010
describe('OneNote', function () {
1111
this.timeout(20 * 1000);
12-
let notebook: Notebook = {
12+
let notebook = <Notebook>{
1313
displayName: "Sample notebook - " + randomString()
1414
};
1515

16-
let section: OnenoteSection = {
16+
let section = <OnenoteSection>{
1717
displayName: "Sample section - " + randomString()
1818
}
1919

spec/types/insights.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { assert } from 'chai'
22

3-
import { getClient, randomString } from "../test-helper"
4-
import { Person } from '@microsoft/microsoft-graph-types-beta'
3+
import { getClient } from "../test-helper"
4+
import { Person } from '@microsoft/microsoft-graph-types'
55

66
declare const describe, it;
77

spec/types/miscellaneous.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import { assert } from 'chai'
1717
import { getClient, randomString } from "../test-helper"
1818
import * as fs from "fs";
1919

20-
2120
declare const describe, it;
2221

2322
describe('Fetch messages', function () {

0 commit comments

Comments
 (0)