PageSourceSearch

https://stryker-mutator.io/assets/js/68bd90e0.2162db4d.js

js stryker-mutator.io collected 2026-09-24 17:56:22 UTC 5,075 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkstryker_mutator_github_io=self.webpackChunkstryker_mutator_github_io||[]).push([["896"],{96214:function(t,e,r){r.r(e),r.d(e,{metadata:function(){return n},default:function(){return u},frontMatter:function(){return o},contentTitle:function(){return a},toc:function(){return c},assets:function(){return l}});var n=JSON.parse('{"id":"stryker-js/getting-started","title":"Getting started","description":"Install Stryker using npm.","source":"@site/docs/stryker-js/getting-started.md","sourceDirName":"stryker-js","slug":"/stryker-js/getting-started","permalink":"/docs/stryker-js/getting-started","draft":false,"unlisted":false,"editUrl":"https://github.com/stryker-mutator/stryker-js/edit/master/docs/getting-started.md","tags":[],"version":"current","frontMatter":{"title":"Getting started","custom_edit_url":"https://github.com/stryker-mutator/stryker-js/edit/master/docs/getting-started.md"},"sidebar":"docs","previous":{"title":"Introduction","permalink":"/docs/stryker-js/introduction"},"next":{"title":"Usage","permalink":"/docs/stryker-js/usage"}}'),s=r(91987),i=r(67008);let o={title:"Getting started",custom_edit_url:"https://github.com/stryker-mutator/stryker-js/edit/master/docs/getting-started.md"},a,l={},c=[{value:"1 Prepare",id:"1-prepare",level:2},{value:"2 Install",id:"2-install",level:2},{value:"3 Let's kill some mutants",id:"3-lets-kill-some-mutants",level:2}];function d(t){let e={a:"a",code:"code",h2:"h2",hr:"hr",img:"img",p:"p",pre:"pre",strong:"strong",...(0,i.R)(),...t.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(e.p,{children:["Install Stryker using ",(0,s.jsx)(e.a,{href:"https://nodejs.org",children:"npm"}),"."]}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{alt:"stryker-install",src:r(72293).A+"",width:"957",height:"281"})}),"\n",(0,s.jsx)(e.h2,{id:"1-prepare",children:"1 Prepare"}),"\n",(0,s.jsx)(e.p,{children:"Make sure you have npm and nodejs installed. Open a terminal / command prompt and cd to the root of your project you want to mutation test."}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-bash",children:"cd my-project\n"})}),"\n",(0,s.jsx)(e.hr,{}),"\n",(0,s.jsx)(e.h2,{id:"2-install",children:"2 Install"}),"\n",(0,s.jsxs)(e.p,{children:["The easiest way to get started with Stryker is by using the ",(0,s.jsx)(e.code,{children:"npm init stryker@latest"})," command."]}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-bash",children:"npm init stryker@latest\n"})}),"\n",(0,s.jsx)(e.p,{children:"This command will first install Stryker and then run the Stryker initializer. During the initialization, you'll be asked a series of questions to help set up Stryker for your project."}),"\n",(0,s.jsxs)(e.p,{children:["If you're asked to install Stryker, choose ",(0,s.jsx)(e.strong,{children:"Yes"}),"."]}),"\n",(0,s.jsxs)(e.p,{children:["After the init is done, inspect the ",(0,s.jsx)(e.code,{children:"stryker.config.mjs"})," file."]}),"\n",(0,s.jsxs)(e.p,{children:["For more information on what these options mean, take a look at ",(0,s.jsx)(e.a,{href:"/docs/stryker-js/configuration",children:"the Configuration docs page"})]}),"\n",(0,s.jsx)(e.hr,{}),"\n",(0,s.jsx)(e.h2,{id:"3-lets-kill-some-mutants",children:"3 Let's kill some mutants"}),"\n",(0,s.jsx)(e.p,{children:"Run Stryker to mutation test your project"}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-bash",children:"npx stryker run\n"})}),"\n",(0,s.jsxs)(e.p,{children:["Have troubles running Stryker? Try running with trace logging. You can also take a look at our ",(0,s.jsx)(e.a,{href:"/docs/stryker-js/troubleshooting",children:"troubleshooting guide"}),"."]}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-bash",children:"npx stryker run --logLevel trace\n"})}),"\n",(0,s.jsxs)(e.p,{children:["You can also have a look at ",(0,s.jsx)(e.a,{href:"/docs/stryker-js/configuration",children:"the Configuration docs page"})," for more information about the configuration."]}),"\n",(0,s.jsxs)(e.p,{children:["Please ",(0,s.jsx)(e.a,{href:"https://github.com/stryker-mutator/stryker/issues",children:"report any issues"})," you have or let us know ",(0,s.jsx)(e.a,{href:"https://join.slack.com/t/stryker-mutator/shared_invite/enQtOTUyMTYyNTg1NDQ0LTU4ODNmZDlmN2I3MmEyMTVhYjZlYmJkOThlNTY3NTM1M2QxYmM5YTM3ODQxYmJjY2YyYzllM2RkMmM1NjNjZjM",children:"via Slack"}),"."]})]})}function u(t={}){let{wrapper:e}={...(0,i.R)(),...t.components};return e?(0,s.jsx)(e,{...t,children:(0,s.jsx)(d,{...t})}):d(t)}},72293:function(t,e,r){e.A=r.p+"assets/images/stryker-install-e11a2327d3f6e194ddff159472ef4995.gif"},67008:function(t,e,r){r.d(e,{R:function(){return o},x:function(){return a}});var n=r(71763);let s={},i=n.createContext(s);function o(t){let e=n.useContext(i);return n.useMemo(function(){return"function"==typeof t?t(e):{...e,...t}},[e,t])}function a(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(s):t.components||s:o(t.components),n.createElement(i.Provider,{value:e},t.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.