@@ -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