From ce86b3dccb2df20106dc465f86515d2f2ba6fec8 Mon Sep 17 00:00:00 2001 From: Bwana Maina Date: Sat, 6 Apr 2024 11:06:13 +0300 Subject: [PATCH] Docs: Add example to point jest to a single file Add example to point jest to a single file not a module. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index df7fe2b..e02bb6f 100644 --- a/README.md +++ b/README.md @@ -160,7 +160,8 @@ Unfortunately, `module-alias` itself would not work from Jest due to a custom be "jest": { "moduleNameMapper": { "@root/(.*)": "/$1", - "@client/(.*)": "/src/client/$1" + "@client/(.*)": "/src/client/$1", + "@server": "/server.js" // Pointing jest to a single file not a directory. }, } ```