---
title: "Comment by John B on \"Setting up a Next.js Application with TypeScript, JIT Tailwind CSS and Jest/react-testing-library\" | Hashnode"
description: "Thanks, this was very helpful! The only additional thing I had to do was to add a fileMock.js to stub static assets, containing the following line: module.expor"
url: "https://hashnode.com/posts/setting-up-a-nextjs-application-with-typescript-jit-tailwind-css-and-jestreact-testing-library/610c96e2b79d6a113667e8bb/comment/6118c988ac5c985f36434ba2"
---

[Discussion](https://hashnode.com/posts/setting-up-a-nextjs-application-with-typescript-jit-tailwind-css-and-jestreact-testing-library/610c96e2b79d6a113667e8bb)

Comment [Setting up a Next.js Application with TypeScript, JIT Tailwind CSS and Jest/react-testing-library](https://hashnode.com/posts/setting-up-a-nextjs-application-with-typescript-jit-tailwind-css-and-jestreact-testing-library/610c96e2b79d6a113667e8bb)

[John B](https://hashnode.com/@wbjohn)

[Aug 15, 2021](https://hashnode.com/posts/setting-up-a-nextjs-application-with-typescript-jit-tailwind-css-and-jestreact-testing-library/610c96e2b79d6a113667e8bb/comment/6118c988ac5c985f36434ba2)

Thanks, this was very helpful! The only additional thing I had to do was to add a fileMock.js to stub static assets, containing the following line:

```
module.exports = "/test-file-stub";
```

And updating the jest config:

```
  moduleNameMapper: {
    "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
      "<rootDir>/__mocks__/fileMock.js",
    "\\.(css|less|scss|sass)$": "<rootDir>/__mocks__/styleMock.js",
    "^pages/(.*)$": "<rootDir>/pages/$1",
    "^components/(.*)$": "<rootDir>/components/$1",
    "^modules/(.*)$": "<rootDir>/modules/$1",
  },
```

[Antonio Lo Fiego (He/Him)](https://hashnode.com/@antoniolofiego)

[Sep 2, 2021](https://hashnode.com/posts/setting-up-a-nextjs-application-with-typescript-jit-tailwind-css-and-jestreact-testing-library/610c96e2b79d6a113667e8bb/comment/6118c988ac5c985f36434ba2#reply-61311f0477de087890b8e290)

That's a good call! If you'd like to add it to the repo via a PR as well it would be wonderful!
