Skip to content

Commit 82c3b22

Browse files
committed
Correct name casing
1 parent eb98555 commit 82c3b22

3 files changed

Lines changed: 28 additions & 28 deletions

File tree

test/end-to-end/src/test-helpers.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@ export async function closeWorkbook(): Promise<void> {
1717

1818
export type TestResult = {
1919
expectedValue: any;
20-
Name: string;
21-
Value: any;
20+
name: string;
21+
value: any;
2222
};
2323

24-
export function addTestResult(testValues: any[], Name: string, Value: any, expectedValue: any) {
24+
export function addTestResult(testValues: any[], name: string, value: any, expectedValue: any) {
2525
const data: TestResult = {
2626
expectedValue,
27-
Name,
28-
Value,
27+
name,
28+
value,
2929
};
3030
testValues.push(data);
3131
}
3232

3333
export function addErrorResult(testValues: any[], errorMessage: string) {
3434
testValues.push({
35-
Name: "test-error",
36-
Value: errorMessage,
35+
name: "test-error",
36+
value: errorMessage,
3737
expectedValue: "no-error",
3838
});
3939
}

test/end-to-end/src/test-taskpane.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ export async function readCFData(cfName: string, readCount: number): Promise<voi
6565
});
6666
}
6767

68-
function addTestResult(Name: string, Value: any) {
68+
function addTestResult(name: string, value: any) {
6969
const data = {
70-
Name,
71-
Value,
70+
name,
71+
value,
7272
};
7373
testValues.push(data);
7474
}

test/end-to-end/tests.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -64,48 +64,48 @@ describe("Test Excel Custom Functions", function () {
6464
clearTimeout(timeoutId);
6565
}
6666

67-
const errorResult = testValues.find((value: any) => value.Name === "test-error");
67+
const errorResult = testValues.find((value: any) => value.name === "test-error");
6868
if (errorResult) {
69-
assert.fail(`[${host}] Taskpane reported error: ${errorResult.Value}`);
69+
assert.fail(`[${host}] Taskpane reported error: ${errorResult.value}`);
7070
}
7171

7272
// Expecting six result values + user agent
73-
testValues = testValues.filter((value: any) => value.Name !== "test-error");
73+
testValues = testValues.filter((value: any) => value.name !== "test-error");
7474
assert.strictEqual(testValues.length > 0, true, `No test results received from ${host} add-in`);
75-
console.log(`User Agent: ${testValues[0].Value}`);
75+
console.log(`User Agent: ${testValues[0].value}`);
7676
assert.strictEqual(testValues.length, 7);
7777
});
7878
it("ADD function should return expected value", async function () {
79-
assert.strictEqual(testJsonData.functions.ADD.result, testValues[1].Value);
79+
assert.strictEqual(testJsonData.functions.ADD.result, testValues[1].value);
8080
});
8181
it("CLOCK function should return expected value", async function () {
8282
// Check that captured values are different to ensure the function is streaming
83-
assert.notStrictEqual(testValues[2].Value, testValues[3].Value);
83+
assert.notStrictEqual(testValues[2].value, testValues[3].value);
8484
// Check if the returned string contains 'AM', 'PM', or 'GMT', indicating it's a time-stamp
8585
assert.strictEqual(
86-
testValues[2].Value.includes(testJsonData.functions.CLOCK.result.amString) ||
87-
testValues[2].Value.includes(testJsonData.functions.CLOCK.result.pmString) ||
88-
testValues[2].Value.includes(testJsonData.functions.CLOCK.result.timeZoneString),
86+
testValues[2].value.includes(testJsonData.functions.CLOCK.result.amString) ||
87+
testValues[2].value.includes(testJsonData.functions.CLOCK.result.pmString) ||
88+
testValues[2].value.includes(testJsonData.functions.CLOCK.result.timeZoneString),
8989
true,
90-
"Found timestamp indicator string in first value '" + testValues[2].Value + "'"
90+
"Found timestamp indicator string in first value '" + testValues[2].value + "'"
9191
);
9292
assert.strictEqual(
93-
testValues[3].Value.includes(testJsonData.functions.CLOCK.result.amString) ||
94-
testValues[3].Value.includes(testJsonData.functions.CLOCK.result.pmString) ||
95-
testValues[3].Value.includes(testJsonData.functions.CLOCK.result.timeZoneString),
93+
testValues[3].value.includes(testJsonData.functions.CLOCK.result.amString) ||
94+
testValues[3].value.includes(testJsonData.functions.CLOCK.result.pmString) ||
95+
testValues[3].value.includes(testJsonData.functions.CLOCK.result.timeZoneString),
9696
true,
97-
"Found timestamp indicator string in second value '" + testValues[3].Value + "'"
97+
"Found timestamp indicator string in second value '" + testValues[3].value + "'"
9898
);
9999
});
100100
it("INCREMENT function should return expected value", async function () {
101101
// Check that captured values are different to ensure the function is streaming
102-
assert.notStrictEqual(testValues[3].Value, testValues[4].Value);
102+
assert.notStrictEqual(testValues[3].value, testValues[4].value);
103103
// Check to see that both captured streaming values are divisible by 4
104-
assert.strictEqual(0, testValues[4].Value % testJsonData.functions.INCREMENT.result);
105-
assert.strictEqual(0, testValues[5].Value % testJsonData.functions.INCREMENT.result);
104+
assert.strictEqual(0, testValues[4].value % testJsonData.functions.INCREMENT.result);
105+
assert.strictEqual(0, testValues[5].value % testJsonData.functions.INCREMENT.result);
106106
});
107107
it("LOG function should return expected value", async function () {
108-
assert.strictEqual(testJsonData.functions.LOG.result, testValues[6].Value);
108+
assert.strictEqual(testJsonData.functions.LOG.result, testValues[6].value);
109109
});
110110
});
111111
after("Teardown test environment", async function () {

0 commit comments

Comments
 (0)