# thinkrank/2.0.1/jest.config.js

ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console &amp; Local SEO, version 2.0.1. 20 lines.

- Page: https://pluginprobe.com/plugins/thinkrank/2.0.1/code/jest.config.js
- Raw: https://pluginprobe.com/plugins/thinkrank/2.0.1/raw/jest.config.js
- Modified: 2026-08-23T12:33:12+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/thinkrank/2.0.1/code/jest.config.js#L10-L20`.

```javascript
/**
 * Jest configuration.
 *
 * Extends @wordpress/scripts' default so component tests can resolve the same
 * path aliases webpack.config.js defines — without this, importing anything
 * that reaches `@utils/…` fails to resolve under Jest while building fine.
 */
const defaultConfig = require('@wordpress/scripts/config/jest-unit.config');

module.exports = {
	...defaultConfig,
	moduleNameMapper: {
		...(defaultConfig.moduleNameMapper || {}),
		'^@admin/(.*)$': '<rootDir>/src/admin/$1',
		'^@components/(.*)$': '<rootDir>/src/admin/components/$1',
		'^@utils/(.*)$': '<rootDir>/src/admin/utils/$1',
		'^@/(.*)$': '<rootDir>/src/$1',
	},
};

```
