I'm working with ts-jest and trying to mock a service function. I want to only pass values for one variable, ignoring the others. Here's an example:
getDataInformationMocked.mockReturnValueOnce({
scopes: ['local','cloud']
});
This code works, but TypeScript shows an error stating that there are more variables that are not being passed.
Error message: The type '{ scopes: string[]; }' does not have the following properties of type 'dataNames': iss, exp, nbf, aud and 20 more.
Is there a way to pass all variables from an interface without creating an object with all values?