Page Not Found
We could not find what you were looking for.
Please contact the owner of the site that linked you to the original URL and let them know their link is broken.
diff --git a/404.html b/404.html index 4b31ec1315..2bb0c8305f 100644 --- a/404.html +++ b/404.html @@ -12,8 +12,8 @@ - - + +
We could not find what you were looking for.
Please contact the owner of the site that linked you to the original URL and let them know their link is broken.
namespace
",id:"no-namespace",level:4},{value:"No const enum
",id:"no-const-enum",level:4},{value:"No declaration merging (enum
, namespace
, ...)",id:"no-declaration-merging-enum-namespace-",level:4},{value:"No legacy import
/export
",id:"no-legacy-importexport",level:4},{value:"No caret type-casting with JSX enabled",id:"no-caret-type-casting-with-jsx-enabled",level:4}];function d(e){const t={a:"a",code:"code",h2:"h2",h4:"h4",hr:"hr",p:"p",pre:"pre",strong:"strong",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(t.p,{children:["In Sept. 2018 Babel7 got released with an interesting preset: ",(0,i.jsx)(t.code,{children:"@babel/preset-typescript"}),"."]}),"\n",(0,i.jsxs)(t.p,{children:["The goal is to make it easy for users using Babel to try TypeScript without moving out from Babel, just by adding a preset in their Babel config (here is the ",(0,i.jsx)(t.a,{href:"https://blogs.msdn.microsoft.com/typescript/2018/08/27/typescript-and-babel-7/",children:"MSDN blog post"})," about TypeScript and Babel 7)."]}),"\n",(0,i.jsx)(t.h2,{id:"limitations",children:"Limitations"}),"\n",(0,i.jsxs)(t.p,{children:["While ",(0,i.jsx)(t.code,{children:"@babel/preset-typescript"})," is a great preset, you must know the limitation of it. Here is what is possible with TypeScript (and ",(0,i.jsx)(t.code,{children:"ts-jest"}),"), which is not with Babel7 and ",(0,i.jsx)(t.code,{children:"@babel/preset-typescript"}),":"]}),"\n",(0,i.jsx)(t.h4,{id:"no-type-checking",children:"No type-checking"}),"\n",(0,i.jsxs)(t.p,{children:["This is the big ",(0,i.jsx)(t.strong,{children:"PRO"})," of using TypeScript vs Babel, you have type-checking out of the box."]}),"\n",(0,i.jsxs)(t.p,{children:["You'll get a more fluent TDD experience (when using ",(0,i.jsx)(t.code,{children:"ts-jest"}),") since files will be type-checked at the same time they're compiled and ran."]}),"\n",(0,i.jsx)(t.p,{children:"Here TypeScript will throw while Babel won't:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ts",children:"const str: string = 42\n"})}),"\n",(0,i.jsx)(t.p,{children:'With Babel, files are transpiled as isolated modules, there is no notion of "project". With TypeScript, files are part of a project and are compiled in that scope.'}),"\n",(0,i.jsx)(t.hr,{}),"\n",(0,i.jsxs)(t.h4,{id:"no-namespace",children:["No ",(0,i.jsx)(t.code,{children:"namespace"})]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ts",children:"namespace app {\n export const VERSION = '1.0.0'\n export class App {\n /* ... */\n }\n}\n"})}),"\n",(0,i.jsx)(t.hr,{}),"\n",(0,i.jsxs)(t.h4,{id:"no-const-enum",children:["No ",(0,i.jsx)(t.code,{children:"const enum"})]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ts",children:"const enum Directions {\n Up,\n Down,\n Left,\n Right,\n}\n"})}),"\n",(0,i.jsx)(t.hr,{}),"\n",(0,i.jsxs)(t.h4,{id:"no-declaration-merging-enum-namespace-",children:["No declaration merging (",(0,i.jsx)(t.code,{children:"enum"}),", ",(0,i.jsx)(t.code,{children:"namespace"}),", ...)"]}),"\n",(0,i.jsxs)(t.p,{children:["You won't be able to do ",(0,i.jsx)(t.a,{href:"https://www.typescriptlang.org/docs/handbook/declaration-merging.html",children:"declaration merging"}),"."]}),"\n",(0,i.jsx)(t.hr,{}),"\n",(0,i.jsxs)(t.h4,{id:"no-legacy-importexport",children:["No legacy ",(0,i.jsx)(t.code,{children:"import"}),"/",(0,i.jsx)(t.code,{children:"export"})]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ts",children:"import lib = require('lib')\n// ...\nexport = myVar\n"})}),"\n",(0,i.jsx)(t.hr,{}),"\n",(0,i.jsx)(t.h4,{id:"no-caret-type-casting-with-jsx-enabled",children:"No caret type-casting with JSX enabled"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ts",children:"const val = namespace
",id:"no-namespace",level:4},{value:"No const enum
",id:"no-const-enum",level:4},{value:"No declaration merging (enum
, namespace
, ...)",id:"no-declaration-merging-enum-namespace-",level:4},{value:"No legacy import
/export
",id:"no-legacy-importexport",level:4},{value:"No caret type-casting with JSX enabled",id:"no-caret-type-casting-with-jsx-enabled",level:4}];function d(e){const t={a:"a",code:"code",h2:"h2",h4:"h4",hr:"hr",p:"p",pre:"pre",strong:"strong",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(t.p,{children:["In Sept. 2018 Babel7 got released with an interesting preset: ",(0,i.jsx)(t.code,{children:"@babel/preset-typescript"}),"."]}),"\n",(0,i.jsxs)(t.p,{children:["The goal is to make it easy for users using Babel to try TypeScript without moving out from Babel, just by adding a preset in their Babel config (here is the ",(0,i.jsx)(t.a,{href:"https://blogs.msdn.microsoft.com/typescript/2018/08/27/typescript-and-babel-7/",children:"MSDN blog post"})," about TypeScript and Babel 7)."]}),"\n",(0,i.jsx)(t.h2,{id:"limitations",children:"Limitations"}),"\n",(0,i.jsxs)(t.p,{children:["While ",(0,i.jsx)(t.code,{children:"@babel/preset-typescript"})," is a great preset, you must know the limitation of it. Here is what is possible with TypeScript (and ",(0,i.jsx)(t.code,{children:"ts-jest"}),"), which is not with Babel7 and ",(0,i.jsx)(t.code,{children:"@babel/preset-typescript"}),":"]}),"\n",(0,i.jsx)(t.h4,{id:"no-type-checking",children:"No type-checking"}),"\n",(0,i.jsxs)(t.p,{children:["This is the big ",(0,i.jsx)(t.strong,{children:"PRO"})," of using TypeScript vs Babel, you have type-checking out of the box."]}),"\n",(0,i.jsxs)(t.p,{children:["You'll get a more fluent TDD experience (when using ",(0,i.jsx)(t.code,{children:"ts-jest"}),") since files will be type-checked at the same time they're compiled and ran."]}),"\n",(0,i.jsx)(t.p,{children:"Here TypeScript will throw while Babel won't:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ts",children:"const str: string = 42\n"})}),"\n",(0,i.jsx)(t.p,{children:'With Babel, files are transpiled as isolated modules, there is no notion of "project". With TypeScript, files are part of a project and are compiled in that scope.'}),"\n",(0,i.jsx)(t.hr,{}),"\n",(0,i.jsxs)(t.h4,{id:"no-namespace",children:["No ",(0,i.jsx)(t.code,{children:"namespace"})]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ts",children:"namespace app {\n export const VERSION = '1.0.0'\n export class App {\n /* ... */\n }\n}\n"})}),"\n",(0,i.jsx)(t.hr,{}),"\n",(0,i.jsxs)(t.h4,{id:"no-const-enum",children:["No ",(0,i.jsx)(t.code,{children:"const enum"})]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ts",children:"const enum Directions {\n Up,\n Down,\n Left,\n Right,\n}\n"})}),"\n",(0,i.jsx)(t.hr,{}),"\n",(0,i.jsxs)(t.h4,{id:"no-declaration-merging-enum-namespace-",children:["No declaration merging (",(0,i.jsx)(t.code,{children:"enum"}),", ",(0,i.jsx)(t.code,{children:"namespace"}),", ...)"]}),"\n",(0,i.jsxs)(t.p,{children:["You won't be able to do ",(0,i.jsx)(t.a,{href:"https://www.typescriptlang.org/docs/handbook/declaration-merging.html",children:"declaration merging"}),"."]}),"\n",(0,i.jsx)(t.hr,{}),"\n",(0,i.jsxs)(t.h4,{id:"no-legacy-importexport",children:["No legacy ",(0,i.jsx)(t.code,{children:"import"}),"/",(0,i.jsx)(t.code,{children:"export"})]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ts",children:"import lib = require('lib')\n// ...\nexport = myVar\n"})}),"\n",(0,i.jsx)(t.hr,{}),"\n",(0,i.jsx)(t.h4,{id:"no-caret-type-casting-with-jsx-enabled",children:"No caret type-casting with JSX enabled"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ts",children:"const val = namespace
",id:"no-namespace",level:4},{value:"No const enum
",id:"no-const-enum",level:4},{value:"No declaration merging (enum
, namespace
, ...)",id:"no-declaration-merging-enum-namespace-",level:4},{value:"No legacy import
/export
",id:"no-legacy-importexport",level:4},{value:"No caret type-casting with JSX enabled",id:"no-caret-type-casting-with-jsx-enabled",level:4}];function d(e){const t={a:"a",code:"code",h2:"h2",h4:"h4",hr:"hr",p:"p",pre:"pre",strong:"strong",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(t.p,{children:["In Sept. 2018 Babel7 got released with an interesting preset: ",(0,i.jsx)(t.code,{children:"@babel/preset-typescript"}),"."]}),"\n",(0,i.jsxs)(t.p,{children:["The goal is to make it easy for users using Babel to try TypeScript without moving out from Babel, just by adding a preset in their Babel config (here is the ",(0,i.jsx)(t.a,{href:"https://blogs.msdn.microsoft.com/typescript/2018/08/27/typescript-and-babel-7/",children:"MSDN blog post"})," about TypeScript and Babel 7)."]}),"\n",(0,i.jsx)(t.h2,{id:"limitations",children:"Limitations"}),"\n",(0,i.jsxs)(t.p,{children:["While ",(0,i.jsx)(t.code,{children:"@babel/preset-typescript"})," is a great preset, you must know the limitation of it. Here is what is possible with TypeScript (and ",(0,i.jsx)(t.code,{children:"ts-jest"}),"), which is not with Babel7 and ",(0,i.jsx)(t.code,{children:"@babel/preset-typescript"}),":"]}),"\n",(0,i.jsx)(t.h4,{id:"no-type-checking",children:"No type-checking"}),"\n",(0,i.jsxs)(t.p,{children:["This is the big ",(0,i.jsx)(t.strong,{children:"PRO"})," of using TypeScript vs Babel, you have type-checking out of the box."]}),"\n",(0,i.jsxs)(t.p,{children:["You'll get a more fluent TDD experience (when using ",(0,i.jsx)(t.code,{children:"ts-jest"}),") since files will be type-checked at the same time they're compiled and ran."]}),"\n",(0,i.jsx)(t.p,{children:"Here TypeScript will throw while Babel won't:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ts",children:"const str: string = 42\n"})}),"\n",(0,i.jsx)(t.p,{children:'With Babel, files are transpiled as isolated modules, there is no notion of "project". With TypeScript, files are part of a project and are compiled in that scope.'}),"\n",(0,i.jsx)(t.hr,{}),"\n",(0,i.jsxs)(t.h4,{id:"no-namespace",children:["No ",(0,i.jsx)(t.code,{children:"namespace"})]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ts",children:"namespace app {\n export const VERSION = '1.0.0'\n export class App {\n /* ... */\n }\n}\n"})}),"\n",(0,i.jsx)(t.hr,{}),"\n",(0,i.jsxs)(t.h4,{id:"no-const-enum",children:["No ",(0,i.jsx)(t.code,{children:"const enum"})]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ts",children:"const enum Directions {\n Up,\n Down,\n Left,\n Right,\n}\n"})}),"\n",(0,i.jsx)(t.hr,{}),"\n",(0,i.jsxs)(t.h4,{id:"no-declaration-merging-enum-namespace-",children:["No declaration merging (",(0,i.jsx)(t.code,{children:"enum"}),", ",(0,i.jsx)(t.code,{children:"namespace"}),", ...)"]}),"\n",(0,i.jsxs)(t.p,{children:["You won't be able to do ",(0,i.jsx)(t.a,{href:"https://www.typescriptlang.org/docs/handbook/declaration-merging.html",children:"declaration merging"}),"."]}),"\n",(0,i.jsx)(t.hr,{}),"\n",(0,i.jsxs)(t.h4,{id:"no-legacy-importexport",children:["No legacy ",(0,i.jsx)(t.code,{children:"import"}),"/",(0,i.jsx)(t.code,{children:"export"})]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ts",children:"import lib = require('lib')\n// ...\nexport = myVar\n"})}),"\n",(0,i.jsx)(t.hr,{}),"\n",(0,i.jsx)(t.h4,{id:"no-caret-type-casting-with-jsx-enabled",children:"No caret type-casting with JSX enabled"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ts",children:"const val = namespace
",id:"no-namespace",level:4},{value:"No const enum
",id:"no-const-enum",level:4},{value:"No declaration merging (enum
, namespace
, ...)",id:"no-declaration-merging-enum-namespace-",level:4},{value:"No legacy import
/export
",id:"no-legacy-importexport",level:4},{value:"No caret type-casting with JSX enabled",id:"no-caret-type-casting-with-jsx-enabled",level:4}];function d(e){const t={a:"a",code:"code",h2:"h2",h4:"h4",hr:"hr",p:"p",pre:"pre",strong:"strong",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(t.p,{children:["In Sept. 2018 Babel7 got released with an interesting preset: ",(0,i.jsx)(t.code,{children:"@babel/preset-typescript"}),"."]}),"\n",(0,i.jsxs)(t.p,{children:["The goal is to make it easy for users using Babel to try TypeScript without moving out from Babel, just by adding a preset in their Babel config (here is the ",(0,i.jsx)(t.a,{href:"https://blogs.msdn.microsoft.com/typescript/2018/08/27/typescript-and-babel-7/",children:"MSDN blog post"})," about TypeScript and Babel 7)."]}),"\n",(0,i.jsx)(t.h2,{id:"limitations",children:"Limitations"}),"\n",(0,i.jsxs)(t.p,{children:["While ",(0,i.jsx)(t.code,{children:"@babel/preset-typescript"})," is a great preset, you must know the limitation of it. Here is what is possible with TypeScript (and ",(0,i.jsx)(t.code,{children:"ts-jest"}),"), which is not with Babel7 and ",(0,i.jsx)(t.code,{children:"@babel/preset-typescript"}),":"]}),"\n",(0,i.jsx)(t.h4,{id:"no-type-checking",children:"No type-checking"}),"\n",(0,i.jsxs)(t.p,{children:["This is the big ",(0,i.jsx)(t.strong,{children:"PRO"})," of using TypeScript vs Babel, you have type-checking out of the box."]}),"\n",(0,i.jsxs)(t.p,{children:["You'll get a more fluent TDD experience (when using ",(0,i.jsx)(t.code,{children:"ts-jest"}),") since files will be type-checked at the same time they're compiled and ran."]}),"\n",(0,i.jsx)(t.p,{children:"Here TypeScript will throw while Babel won't:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ts",children:"const str: string = 42\n"})}),"\n",(0,i.jsx)(t.p,{children:'With Babel, files are transpiled as isolated modules, there is no notion of "project". With TypeScript, files are part of a project and are compiled in that scope.'}),"\n",(0,i.jsx)(t.hr,{}),"\n",(0,i.jsxs)(t.h4,{id:"no-namespace",children:["No ",(0,i.jsx)(t.code,{children:"namespace"})]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ts",children:"namespace app {\n export const VERSION = '1.0.0'\n export class App {\n /* ... */\n }\n}\n"})}),"\n",(0,i.jsx)(t.hr,{}),"\n",(0,i.jsxs)(t.h4,{id:"no-const-enum",children:["No ",(0,i.jsx)(t.code,{children:"const enum"})]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ts",children:"const enum Directions {\n Up,\n Down,\n Left,\n Right,\n}\n"})}),"\n",(0,i.jsx)(t.hr,{}),"\n",(0,i.jsxs)(t.h4,{id:"no-declaration-merging-enum-namespace-",children:["No declaration merging (",(0,i.jsx)(t.code,{children:"enum"}),", ",(0,i.jsx)(t.code,{children:"namespace"}),", ...)"]}),"\n",(0,i.jsxs)(t.p,{children:["You won't be able to do ",(0,i.jsx)(t.a,{href:"https://www.typescriptlang.org/docs/handbook/declaration-merging.html",children:"declaration merging"}),"."]}),"\n",(0,i.jsx)(t.hr,{}),"\n",(0,i.jsxs)(t.h4,{id:"no-legacy-importexport",children:["No legacy ",(0,i.jsx)(t.code,{children:"import"}),"/",(0,i.jsx)(t.code,{children:"export"})]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ts",children:"import lib = require('lib')\n// ...\nexport = myVar\n"})}),"\n",(0,i.jsx)(t.hr,{}),"\n",(0,i.jsx)(t.h4,{id:"no-caret-type-casting-with-jsx-enabled",children:"No caret type-casting with JSX enabled"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ts",children:"const val = tsconfig
file",id:"path-to-a-tsconfig-file",level:4},{value:"Inline compiler options",id:"inline-compiler-options",level:4},{value:"Disable auto-lookup",id:"disable-auto-lookup",level:4}];function d(e){const n={a:"a",code:"code",h3:"h3",h4:"h4",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"tsconfig"})," option allows you to define which ",(0,s.jsx)(n.code,{children:"tsconfig"})," JSON file to use. An inline ",(0,s.jsx)(n.a,{href:"https://www.typescriptlang.org/docs/handbook/compiler-options.html#compiler-options",children:"compiler options"})," object can also be specified instead of a file path."]}),"\n",(0,s.jsxs)(n.p,{children:["By default ",(0,s.jsx)(n.code,{children:"ts-jest"})," will try to find a ",(0,s.jsx)(n.code,{children:"tsconfig.json"})," in your project. If it cannot find one, it will use the default TypeScript ",(0,s.jsx)(n.a,{href:"https://www.typescriptlang.org/docs/handbook/compiler-options.html#compiler-options",children:"compiler options"}),"; except, ",(0,s.jsx)(n.code,{children:"ES2015"})," is used as ",(0,s.jsx)(n.code,{children:"target"})," instead of ",(0,s.jsx)(n.code,{children:"ES5"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["If you need to use defaults and force ",(0,s.jsx)(n.code,{children:"ts-jest"})," to use the defaults even if there is a ",(0,s.jsx)(n.code,{children:"tsconfig.json"})," in your project, you can set this option to ",(0,s.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"examples",children:"Examples"}),"\n",(0,s.jsxs)(n.h4,{id:"path-to-a-tsconfig-file",children:["Path to a ",(0,s.jsx)(n.code,{children:"tsconfig"})," file"]}),"\n",(0,s.jsxs)(n.p,{children:["The path should be relative to the current working directory where you start Jest from. You can also use ",(0,s.jsx)(n.code,{children:"tsconfig
file",id:"path-to-a-tsconfig-file",level:4},{value:"Inline compiler options",id:"inline-compiler-options",level:4},{value:"Disable auto-lookup",id:"disable-auto-lookup",level:4}];function d(e){const n={a:"a",code:"code",h3:"h3",h4:"h4",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"tsconfig"})," option allows you to define which ",(0,s.jsx)(n.code,{children:"tsconfig"})," JSON file to use. An inline ",(0,s.jsx)(n.a,{href:"https://www.typescriptlang.org/docs/handbook/compiler-options.html#compiler-options",children:"compiler options"})," object can also be specified instead of a file path."]}),"\n",(0,s.jsxs)(n.p,{children:["By default ",(0,s.jsx)(n.code,{children:"ts-jest"})," will try to find a ",(0,s.jsx)(n.code,{children:"tsconfig.json"})," in your project. If it cannot find one, it will use the default TypeScript ",(0,s.jsx)(n.a,{href:"https://www.typescriptlang.org/docs/handbook/compiler-options.html#compiler-options",children:"compiler options"}),"; except, ",(0,s.jsx)(n.code,{children:"ES2015"})," is used as ",(0,s.jsx)(n.code,{children:"target"})," instead of ",(0,s.jsx)(n.code,{children:"ES5"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["If you need to use defaults and force ",(0,s.jsx)(n.code,{children:"ts-jest"})," to use the defaults even if there is a ",(0,s.jsx)(n.code,{children:"tsconfig.json"})," in your project, you can set this option to ",(0,s.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"examples",children:"Examples"}),"\n",(0,s.jsxs)(n.h4,{id:"path-to-a-tsconfig-file",children:["Path to a ",(0,s.jsx)(n.code,{children:"tsconfig"})," file"]}),"\n",(0,s.jsxs)(n.p,{children:["The path should be relative to the current working directory where you start Jest from. You can also use ",(0,s.jsx)(n.code,{children:"mocked<T>(item: T, deep = false)
",id:"mockedtitem-t-deep--false",level:2},{value:"Example",id:"example",level:3}];function a(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",p:"p",pre:"pre",strong:"strong",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.admonition,{type:"warning",children:(0,o.jsxs)(t.p,{children:["This function is now deprecated and will be removed in ",(0,o.jsx)(t.strong,{children:"28.0.0"}),". The function has been integrated into ",(0,o.jsx)(t.code,{children:"jest-mock"})," package\nas a part of Jest ",(0,o.jsx)(t.strong,{children:"27.4.0"}),", see ",(0,o.jsx)(t.a,{href:"https://github.com/facebook/jest/pull/12089",children:"https://github.com/facebook/jest/pull/12089"}),". Please use the one from ",(0,o.jsx)(t.code,{children:"jest-mock"})," instead."]})}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.code,{children:"ts-jest"})," provides some test utilities to be used in your test, related to TypeScript."]}),"\n",(0,o.jsx)(t.h2,{id:"mockedtitem-t-deep--false",children:(0,o.jsx)(t.code,{children:"mockedmocked<T>(item: T, deep = false)
",id:"mockedtitem-t-deep--false",level:2},{value:"Example",id:"example",level:3}];function a(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",p:"p",pre:"pre",strong:"strong",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.admonition,{type:"warning",children:(0,o.jsxs)(t.p,{children:["This function is now deprecated and will be removed in ",(0,o.jsx)(t.strong,{children:"28.0.0"}),". The function has been integrated into ",(0,o.jsx)(t.code,{children:"jest-mock"})," package\nas a part of Jest ",(0,o.jsx)(t.strong,{children:"27.4.0"}),", see ",(0,o.jsx)(t.a,{href:"https://github.com/facebook/jest/pull/12089",children:"https://github.com/facebook/jest/pull/12089"}),". Please use the one from ",(0,o.jsx)(t.code,{children:"jest-mock"})," instead."]})}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.code,{children:"ts-jest"})," provides some test utilities to be used in your test, related to TypeScript."]}),"\n",(0,o.jsx)(t.h2,{id:"mockedtitem-t-deep--false",children:(0,o.jsx)(t.code,{children:"mockedts-jest
process",id:"ts-jest-process",level:2}];function d(e){const t={code:"code",em:"em",h2:"h2",img:"img",p:"p",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.p,{children:(0,o.jsxs)(t.em,{children:["These are internal technical documents. If you're not a contributor to ",(0,o.jsx)(t.code,{children:"ts-jest"}),", but simply trying to use the library you'll find nothing of value here"]})}),"\n",(0,o.jsx)(t.h2,{id:"jest-process",children:"Jest process"}),"\n",(0,o.jsx)(t.img,{src:"https://www.plantuml.com/plantuml/png/NP0n5e8m44Jxd68xaq8E08M5fQU8C97uS8FPJS7jVI0FmNRspyo-4VLPZQaptYLcs5E80qwkCIO6ihqNygJPiuIKNnT7seF9JX2t0Di9cMRu0RtwjiSDqn6kTsIresnLLQun60HaEJbJ5m4z8Kht4WSzHsuCk8lX-r5aQcVhN_fiMdHg4ojO3v7xxZ6d5Y9hRrt6pklgtOf-rbNOvfc70NSV"}),"\n",(0,o.jsxs)(t.h2,{id:"ts-jest-process",children:[(0,o.jsx)(t.code,{children:"ts-jest"})," process"]}),"\n",(0,o.jsx)(t.img,{src:"https://www.plantuml.com/plantuml/png/ZLJRRjim37tNLn3Omn9WwGUaG8Uz3YWmOFq1nQ9YjJ8PY7Iz0lduGHV7YHjWyvDruI7FuH7FfyGTYd0w6r6Rr9YzoayKVMWd6-4nTRXzD2Pus4ZFOtGWcW8TW__ulWNjaM3pWR8r-rTXMWuVpUu9nfEpYgR2F1g3KH0sn5k3v8Ali3v493iW83c1AMWF3-v1vHPz2YU46OXO4L8uzcg8WH0TA4F7mob4D0vzeA212JAsv6IGGwuBCESlBtqGZNXkSGasdUrwTDjpgIi8HwleO60tHfHRkWlIlaje5S6IWm9WL21QEe9WUW-vtiPsztHXK3CGd31944NI6hlIj0e80muDsYSUFWNTAFllqlUDSD7QQB8aUVbSxZPn8terHJsOGenmm5bUPwp0Ei6Ln000IpLGljkCTUyYJbqkMQ5zWtr360M1VQv-3hYSLzaTs0E_Nwdlp88momP1CfA3gKUw72UqBj2ncQJkhNZKlbKAeoWFyEFtIraNsJod0PDK3ci6FQQIU2e_FGVHd8rzEt_DBstWxYrVSapu3Qp0X362dSiP1TEk-3bRV4vfixVdAmURYJ51n-J3qNnciNkwz6xnN-7amv-s0uCzDHwVJ7UxVSzyHQRprJov-_YN9zycIMxkmHumhlnPzkuFeaNapiOeDNoNfJINz8iP_tS4zLR0UiNqgs90p_osVZGsDsPzwTwOMseCrRdv8YJKCP4OuG6rpqu8-hMyB5EiQGK8fzQEwv5LozmlXhlg8fBx2m00"})]})}function a(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,t,s)=>{s.d(t,{R:()=>i,x:()=>c});var n=s(6540);const o={},r=n.createContext(o);function i(e){const t=n.useContext(r);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),n.createElement(r.Provider,{value:t},e.children)}}}]);
\ No newline at end of file
+"use strict";(self.webpackChunkts_jest_docs=self.webpackChunkts_jest_docs||[]).push([[8317],{6348:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>l,contentTitle:()=>c,default:()=>a,frontMatter:()=>i,metadata:()=>n,toc:()=>u});const n=JSON.parse('{"id":"processing","title":"Processing flow","description":"These are internal technical documents. If you\'re not a contributor to ts-jest, but simply trying to use the library you\'ll find nothing of value here","source":"@site/versioned_docs/version-29.0/processing.md","sourceDirName":".","slug":"/processing","permalink":"/ts-jest/docs/29.0/processing","draft":false,"unlisted":false,"editUrl":"https://github.com/kulshekhar/ts-jest/edit/main/website/versioned_docs/version-29.0/processing.md","tags":[],"version":"29.0","lastUpdatedBy":"renovate[bot]","lastUpdatedAt":1733918568000,"frontMatter":{"id":"processing","title":"Processing flow"},"sidebar":"version-29.0-docs","previous":{"title":"Introduction","permalink":"/ts-jest/docs/29.0/"},"next":{"title":"Contributing","permalink":"/ts-jest/docs/29.0/contributing"}}');var o=s(4848),r=s(8453);const i={id:"processing",title:"Processing flow"},c=void 0,l={},u=[{value:"Jest process",id:"jest-process",level:2},{value:"ts-jest
process",id:"ts-jest-process",level:2}];function d(e){const t={code:"code",em:"em",h2:"h2",img:"img",p:"p",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.p,{children:(0,o.jsxs)(t.em,{children:["These are internal technical documents. If you're not a contributor to ",(0,o.jsx)(t.code,{children:"ts-jest"}),", but simply trying to use the library you'll find nothing of value here"]})}),"\n",(0,o.jsx)(t.h2,{id:"jest-process",children:"Jest process"}),"\n",(0,o.jsx)(t.img,{src:"https://www.plantuml.com/plantuml/png/NP0n5e8m44Jxd68xaq8E08M5fQU8C97uS8FPJS7jVI0FmNRspyo-4VLPZQaptYLcs5E80qwkCIO6ihqNygJPiuIKNnT7seF9JX2t0Di9cMRu0RtwjiSDqn6kTsIresnLLQun60HaEJbJ5m4z8Kht4WSzHsuCk8lX-r5aQcVhN_fiMdHg4ojO3v7xxZ6d5Y9hRrt6pklgtOf-rbNOvfc70NSV"}),"\n",(0,o.jsxs)(t.h2,{id:"ts-jest-process",children:[(0,o.jsx)(t.code,{children:"ts-jest"})," process"]}),"\n",(0,o.jsx)(t.img,{src:"https://www.plantuml.com/plantuml/png/ZLJRRjim37tNLn3Omn9WwGUaG8Uz3YWmOFq1nQ9YjJ8PY7Iz0lduGHV7YHjWyvDruI7FuH7FfyGTYd0w6r6Rr9YzoayKVMWd6-4nTRXzD2Pus4ZFOtGWcW8TW__ulWNjaM3pWR8r-rTXMWuVpUu9nfEpYgR2F1g3KH0sn5k3v8Ali3v493iW83c1AMWF3-v1vHPz2YU46OXO4L8uzcg8WH0TA4F7mob4D0vzeA212JAsv6IGGwuBCESlBtqGZNXkSGasdUrwTDjpgIi8HwleO60tHfHRkWlIlaje5S6IWm9WL21QEe9WUW-vtiPsztHXK3CGd31944NI6hlIj0e80muDsYSUFWNTAFllqlUDSD7QQB8aUVbSxZPn8terHJsOGenmm5bUPwp0Ei6Ln000IpLGljkCTUyYJbqkMQ5zWtr360M1VQv-3hYSLzaTs0E_Nwdlp88momP1CfA3gKUw72UqBj2ncQJkhNZKlbKAeoWFyEFtIraNsJod0PDK3ci6FQQIU2e_FGVHd8rzEt_DBstWxYrVSapu3Qp0X362dSiP1TEk-3bRV4vfixVdAmURYJ51n-J3qNnciNkwz6xnN-7amv-s0uCzDHwVJ7UxVSzyHQRprJov-_YN9zycIMxkmHumhlnPzkuFeaNapiOeDNoNfJINz8iP_tS4zLR0UiNqgs90p_osVZGsDsPzwTwOMseCrRdv8YJKCP4OuG6rpqu8-hMyB5EiQGK8fzQEwv5LozmlXhlg8fBx2m00"})]})}function a(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,t,s)=>{s.d(t,{R:()=>i,x:()=>c});var n=s(6540);const o={},r=n.createContext(o);function i(e){const t=n.useContext(r);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),n.createElement(r.Provider,{value:t},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/265d7427.2fb79e7b.js b/assets/js/265d7427.45a293f1.js
similarity index 98%
rename from assets/js/265d7427.2fb79e7b.js
rename to assets/js/265d7427.45a293f1.js
index a4d2e5e173..d67ef67173 100644
--- a/assets/js/265d7427.2fb79e7b.js
+++ b/assets/js/265d7427.45a293f1.js
@@ -1 +1 @@
-"use strict";(self.webpackChunkts_jest_docs=self.webpackChunkts_jest_docs||[]).push([[7556],{1317:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>r,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"getting-started/options/stringifyContentPathRegex","title":"Stringify content option","description":"The stringifyContentPathRegex option has been kept for backward compatibility of HTML_TRANSFORM","source":"@site/versioned_docs/version-27.0/getting-started/options/stringifyContentPathRegex.md","sourceDirName":"getting-started/options","slug":"/getting-started/options/stringifyContentPathRegex","permalink":"/ts-jest/docs/27.0/getting-started/options/stringifyContentPathRegex","draft":false,"unlisted":false,"editUrl":"https://github.com/kulshekhar/ts-jest/edit/main/website/versioned_docs/version-27.0/getting-started/options/stringifyContentPathRegex.md","tags":[],"version":"27.0","lastUpdatedBy":"renovate[bot]","lastUpdatedAt":1733832425000,"frontMatter":{"title":"Stringify content option"}}');var o=n(4848),i=n(8453);const r={title:"Stringify content option"},a=void 0,c={},l=[{value:"Example",id:"example",level:3}];function d(e){const t={code:"code",h3:"h3",p:"p",pre:"pre",strong:"strong",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.code,{children:"stringifyContentPathRegex"})," option has been kept for backward compatibility of ",(0,o.jsx)(t.code,{children:"__HTML_TRANSFORM__"}),"\nIt's a regular expression pattern used to match the path of file to be transformed.\nIf it matches, the file will be exported as a module exporting its content."]}),"\n",(0,o.jsxs)(t.p,{children:["Let's say for example that you have a file ",(0,o.jsx)(t.code,{children:"foo.ts"})," which contains ",(0,o.jsx)(t.code,{children:'export default "bar"'}),", and your ",(0,o.jsx)(t.code,{children:"stringifyContentPathRegex"})," is set to ",(0,o.jsx)(t.code,{children:"foo\\\\.ts$"}),", the resulting module won't be the result of compiling ",(0,o.jsx)(t.code,{children:"foo.ts"})," source, but instead it'll be a module which exports the string ",(0,o.jsx)(t.code,{children:'"export default \\"bar\\""'}),"."]}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.strong,{children:"CAUTION"}),": Whatever file(s) you want to match with ",(0,o.jsx)(t.code,{children:"stringifyContentPathRegex"})," pattern, you must ensure the Jest ",(0,o.jsx)(t.code,{children:"transform"})," option pointing to ",(0,o.jsx)(t.code,{children:"ts-jest"})," matches them. You may also have to add the extension(s) of this/those file(s) to ",(0,o.jsx)(t.code,{children:"moduleFileExtensions"})," Jest option."]}),"\n",(0,o.jsx)(t.h3,{id:"example",children:"Example"}),"\n",(0,o.jsxs)(t.p,{children:["In the ",(0,o.jsx)(t.code,{children:"jest.config.js"})," version, you could do as in the ",(0,o.jsx)(t.code,{children:"package.json"})," version of the config, but extending from the preset will ensure more compatibility without any changes when updating."]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-js",children:"// jest.config.js\n// Here `defaults` can be replaced with any other preset\nconst { defaults: tsjPreset } = require('ts-jest/presets')\n\nmodule.exports = {\n // [...]\n moduleFileExtensions: [...tsjPreset.moduleFileExtensions, 'html'],\n transform: {\n ...tsjPreset.transform,\n '\\\\.html$': 'ts-jest',\n },\n globals: {\n 'ts-jest': {\n stringifyContentPathRegex: /\\.html$/,\n },\n },\n}\n"})}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-json",children:'// package.json\n{\n // [...]\n "jest": {\n "moduleFileExtensions": ["js", "ts", "html"],\n "transform": {\n "\\\\.(html|ts|js)$": "ts-jest"\n },\n "globals": {\n "ts-jest": {\n "stringifyContentPathRegex": "\\\\.html$"\n }\n }\n }\n}\n'})})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>a});var s=n(6540);const o={},i=s.createContext(o);function r(e){const t=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]);
\ No newline at end of file
+"use strict";(self.webpackChunkts_jest_docs=self.webpackChunkts_jest_docs||[]).push([[7556],{1317:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>r,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"getting-started/options/stringifyContentPathRegex","title":"Stringify content option","description":"The stringifyContentPathRegex option has been kept for backward compatibility of HTML_TRANSFORM","source":"@site/versioned_docs/version-27.0/getting-started/options/stringifyContentPathRegex.md","sourceDirName":"getting-started/options","slug":"/getting-started/options/stringifyContentPathRegex","permalink":"/ts-jest/docs/27.0/getting-started/options/stringifyContentPathRegex","draft":false,"unlisted":false,"editUrl":"https://github.com/kulshekhar/ts-jest/edit/main/website/versioned_docs/version-27.0/getting-started/options/stringifyContentPathRegex.md","tags":[],"version":"27.0","lastUpdatedBy":"renovate[bot]","lastUpdatedAt":1733918568000,"frontMatter":{"title":"Stringify content option"}}');var o=n(4848),i=n(8453);const r={title:"Stringify content option"},a=void 0,c={},l=[{value:"Example",id:"example",level:3}];function d(e){const t={code:"code",h3:"h3",p:"p",pre:"pre",strong:"strong",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.code,{children:"stringifyContentPathRegex"})," option has been kept for backward compatibility of ",(0,o.jsx)(t.code,{children:"__HTML_TRANSFORM__"}),"\nIt's a regular expression pattern used to match the path of file to be transformed.\nIf it matches, the file will be exported as a module exporting its content."]}),"\n",(0,o.jsxs)(t.p,{children:["Let's say for example that you have a file ",(0,o.jsx)(t.code,{children:"foo.ts"})," which contains ",(0,o.jsx)(t.code,{children:'export default "bar"'}),", and your ",(0,o.jsx)(t.code,{children:"stringifyContentPathRegex"})," is set to ",(0,o.jsx)(t.code,{children:"foo\\\\.ts$"}),", the resulting module won't be the result of compiling ",(0,o.jsx)(t.code,{children:"foo.ts"})," source, but instead it'll be a module which exports the string ",(0,o.jsx)(t.code,{children:'"export default \\"bar\\""'}),"."]}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.strong,{children:"CAUTION"}),": Whatever file(s) you want to match with ",(0,o.jsx)(t.code,{children:"stringifyContentPathRegex"})," pattern, you must ensure the Jest ",(0,o.jsx)(t.code,{children:"transform"})," option pointing to ",(0,o.jsx)(t.code,{children:"ts-jest"})," matches them. You may also have to add the extension(s) of this/those file(s) to ",(0,o.jsx)(t.code,{children:"moduleFileExtensions"})," Jest option."]}),"\n",(0,o.jsx)(t.h3,{id:"example",children:"Example"}),"\n",(0,o.jsxs)(t.p,{children:["In the ",(0,o.jsx)(t.code,{children:"jest.config.js"})," version, you could do as in the ",(0,o.jsx)(t.code,{children:"package.json"})," version of the config, but extending from the preset will ensure more compatibility without any changes when updating."]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-js",children:"// jest.config.js\n// Here `defaults` can be replaced with any other preset\nconst { defaults: tsjPreset } = require('ts-jest/presets')\n\nmodule.exports = {\n // [...]\n moduleFileExtensions: [...tsjPreset.moduleFileExtensions, 'html'],\n transform: {\n ...tsjPreset.transform,\n '\\\\.html$': 'ts-jest',\n },\n globals: {\n 'ts-jest': {\n stringifyContentPathRegex: /\\.html$/,\n },\n },\n}\n"})}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-json",children:'// package.json\n{\n // [...]\n "jest": {\n "moduleFileExtensions": ["js", "ts", "html"],\n "transform": {\n "\\\\.(html|ts|js)$": "ts-jest"\n },\n "globals": {\n "ts-jest": {\n "stringifyContentPathRegex": "\\\\.html$"\n }\n }\n }\n}\n'})})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>a});var s=n(6540);const o={},i=s.createContext(o);function r(e){const t=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/270520cb.66d198dc.js b/assets/js/270520cb.387ac587.js
similarity index 99%
rename from assets/js/270520cb.66d198dc.js
rename to assets/js/270520cb.387ac587.js
index 6a6db9505e..c982dd4b12 100644
--- a/assets/js/270520cb.66d198dc.js
+++ b/assets/js/270520cb.387ac587.js
@@ -1 +1 @@
-"use strict";(self.webpackChunkts_jest_docs=self.webpackChunkts_jest_docs||[]).push([[3110],{4:(t,e,s)=>{s.r(e),s.d(e,{assets:()=>u,contentTitle:()=>c,default:()=>j,frontMatter:()=>l,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"getting-started/options/tsconfig","title":"TypeScript Config option","description":"The tsconfig option allows you to define which tsconfig JSON file to use. An inline compiler options object can also be specified instead of a file path.","source":"@site/versioned_docs/version-29.0/getting-started/options/tsconfig.md","sourceDirName":"getting-started/options","slug":"/getting-started/options/tsconfig","permalink":"/ts-jest/docs/29.0/getting-started/options/tsconfig","draft":false,"unlisted":false,"editUrl":"https://github.com/kulshekhar/ts-jest/edit/main/website/versioned_docs/version-29.0/getting-started/options/tsconfig.md","tags":[],"version":"29.0","lastUpdatedBy":"renovate[bot]","lastUpdatedAt":1733832425000,"frontMatter":{"title":"TypeScript Config option"}}');var o=s(4848),r=s(8453),i=s(9489),a=s(7227);const l={title:"TypeScript Config option"},c=void 0,u={},d=[{value:"Examples",id:"examples",level:3},{value:"Path to a tsconfig
file",id:"path-to-a-tsconfig-file",level:4},{value:"Inline compiler options",id:"inline-compiler-options",level:4},{value:"Disable auto-lookup",id:"disable-auto-lookup",level:4}];function p(t){const e={a:"a",code:"code",h3:"h3",h4:"h4",p:"p",pre:"pre",...(0,r.R)(),...t.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(e.p,{children:["The ",(0,o.jsx)(e.code,{children:"tsconfig"})," option allows you to define which ",(0,o.jsx)(e.code,{children:"tsconfig"})," JSON file to use. An inline ",(0,o.jsx)(e.a,{href:"https://www.typescriptlang.org/docs/handbook/compiler-options.html#compiler-options",children:"compiler options"})," object can also be specified instead of a file path."]}),"\n",(0,o.jsxs)(e.p,{children:["By default ",(0,o.jsx)(e.code,{children:"ts-jest"})," will try to find a ",(0,o.jsx)(e.code,{children:"tsconfig.json"})," in your project. If it cannot find one, it will use the default TypeScript ",(0,o.jsx)(e.a,{href:"https://www.typescriptlang.org/docs/handbook/compiler-options.html#compiler-options",children:"compiler options"}),"; except, ",(0,o.jsx)(e.code,{children:"ES2015"})," is used as ",(0,o.jsx)(e.code,{children:"target"})," instead of ",(0,o.jsx)(e.code,{children:"ES5"}),"."]}),"\n",(0,o.jsxs)(e.p,{children:["If you need to use defaults and force ",(0,o.jsx)(e.code,{children:"ts-jest"})," to use the defaults even if there is a ",(0,o.jsx)(e.code,{children:"tsconfig.json"})," in your project, you can set this option to ",(0,o.jsx)(e.code,{children:"false"}),"."]}),"\n",(0,o.jsx)(e.h3,{id:"examples",children:"Examples"}),"\n",(0,o.jsxs)(e.h4,{id:"path-to-a-tsconfig-file",children:["Path to a ",(0,o.jsx)(e.code,{children:"tsconfig"})," file"]}),"\n",(0,o.jsxs)(e.p,{children:["The path should be relative to the current working directory where you start Jest from. You can also use ",(0,o.jsx)(e.code,{children:"tsconfig
file",id:"path-to-a-tsconfig-file",level:4},{value:"Inline compiler options",id:"inline-compiler-options",level:4},{value:"Disable auto-lookup",id:"disable-auto-lookup",level:4}];function p(t){const e={a:"a",code:"code",h3:"h3",h4:"h4",p:"p",pre:"pre",...(0,r.R)(),...t.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(e.p,{children:["The ",(0,o.jsx)(e.code,{children:"tsconfig"})," option allows you to define which ",(0,o.jsx)(e.code,{children:"tsconfig"})," JSON file to use. An inline ",(0,o.jsx)(e.a,{href:"https://www.typescriptlang.org/docs/handbook/compiler-options.html#compiler-options",children:"compiler options"})," object can also be specified instead of a file path."]}),"\n",(0,o.jsxs)(e.p,{children:["By default ",(0,o.jsx)(e.code,{children:"ts-jest"})," will try to find a ",(0,o.jsx)(e.code,{children:"tsconfig.json"})," in your project. If it cannot find one, it will use the default TypeScript ",(0,o.jsx)(e.a,{href:"https://www.typescriptlang.org/docs/handbook/compiler-options.html#compiler-options",children:"compiler options"}),"; except, ",(0,o.jsx)(e.code,{children:"ES2015"})," is used as ",(0,o.jsx)(e.code,{children:"target"})," instead of ",(0,o.jsx)(e.code,{children:"ES5"}),"."]}),"\n",(0,o.jsxs)(e.p,{children:["If you need to use defaults and force ",(0,o.jsx)(e.code,{children:"ts-jest"})," to use the defaults even if there is a ",(0,o.jsx)(e.code,{children:"tsconfig.json"})," in your project, you can set this option to ",(0,o.jsx)(e.code,{children:"false"}),"."]}),"\n",(0,o.jsx)(e.h3,{id:"examples",children:"Examples"}),"\n",(0,o.jsxs)(e.h4,{id:"path-to-a-tsconfig-file",children:["Path to a ",(0,o.jsx)(e.code,{children:"tsconfig"})," file"]}),"\n",(0,o.jsxs)(e.p,{children:["The path should be relative to the current working directory where you start Jest from. You can also use ",(0,o.jsx)(e.code,{children:"mocked<T>(item: T, deep = false)
",id:"mockedtitem-t-deep--false",level:2},{value:"Example",id:"example",level:3}];function a(e){const t={code:"code",h2:"h2",h3:"h3",p:"p",pre:"pre",strong:"strong",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.code,{children:"ts-jest"})," provides some test utilities to be used in your test, related to TypeScript."]}),"\n",(0,n.jsx)(t.h2,{id:"mockedtitem-t-deep--false",children:(0,n.jsx)(t.code,{children:"mocked