Question: When a user is idle for ten minutes, I would like to have an automatic redirect. Below is the test code, which is not working.

The `LoginPath`, `LogoutPath`, and `AccessDeniedPath` do not exist. Therefore, I would expect an error after the timeout period. Instead, I can continue to successfully click "Home" and "About" without an error and without being redirected. My expectation is that I will be redirected back to the home page.

Sample code:

```cs
services.AddMemoryCache();
services.AddSession(options =>
    {
        options.Cookie.Name = "MyAppCookie";
        options.Cookie.IsEssential = true;
        options.Cookie.HttpOnly = true;
        options.IdleTimeout = TimeSpan.FromMinutes(1);
    });

services.ConfigureApplicationCookie(options =>
    {
        options.Cookie.HttpOnly = true;
        options.ExpireTimeSpan = TimeSpan.FromMinutes(1);
        options.LoginPath = "/Account/Login";
        options.LogoutPath = "/Account/Login";
        options.AccessDeniedPath = "/Account/AccessDenied";
        options.SlidingExpiration = true;
    });

```

Answer: 
You can import the functions as a module

`import * as module from './fileName'`

To mock the implementation you can do

`jest.spyOn(module, 'dependentFunction').mockImplementation(/*....Mocked implementation*/)`

To call the other function, use
`module.callingFunction()`
Appologies for the late update. But the solution in the following article was the fix:

<https://medium.com/welldone-software/jest-how-to-mock-a-function-call-inside-a-module-21c05c57a39f>