Jest test mocks for Excel calculate method

Fewelebele 1 Reputation point

I am new in creating Jest test scenarios. I was trying to create a mock data and test coverage for a Excel calculate method ( context.application.calculate(Excel.CalculationType.full) ) and I struggle to figure out what the test function should receive and what to expect when whole workbook is being recalculated.

I've been looking on how to do it on : but my function is different than any shown here.

The function that needs to be tested is this:

const recalculateWorkbook = async () => {  
  await (context) => {  
    await context.sync();  
  }).catch(function (error) {  
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,294 questions
{count} votes