Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/crutchcorn/cli-testing-library. 🐨 Simple and complete CLI testing utilities that encourage good tes cli-testing.com
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485<!DOCTYPE html><html lang="en" dir="ltr" data-theme="dark" data-has-toc data-has-sidebar class="astro-cb6occid"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>getInstanceError | CLI Testing Library</title><link rel="canonical" href="https://cli-testing.com/guides/reference/functions/getinstanceerror/"/><link rel="sitemap" href="/sitemap-index.xml"/><link rel="shortcut icon" href="/./public/koala.png" type="image/png"/><meta name="generator" content="Astro v7.2.0"/><meta name="generator" content="Starlight v0.41.7"/><meta property="og:title" content="getInstanceError"/><meta property="og:type" content="article"/><meta property="og:url" content="https://cli-testing.com/guides/reference/functions/getinstanceerror/"/><meta property="og:locale" content="en"/><meta property="og:site_name" content="CLI Testing Library"/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:image" content="https://cli-testing.com/share-banner.png"><meta name="twitter:card" content="summary_large_image"><meta property="og:image" content="https://cli-testing.com/share-banner.png"><script> window.StarlightThemeProvider = (() => { const storedTheme = typeof localStorage !== 'undefined' && localStorage.getItem('starlight-theme'); const theme = storedTheme || (window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark'); document.documentElement.dataset.theme = theme === 'light' ? 'light' : 'dark'; return { updatePickers(theme = storedTheme || 'auto') { document.querySelectorAll('starlight-theme-select').forEach((picker) => { const select = picker.querySelector('select'); if (select) select.value = theme; /** @type {HTMLTemplateElement | null} */ const tmpl = document.querySelector(`#theme-icons`); const newIcon = tmpl && tmpl.content.querySelector('.' + theme); if (newIcon) { const oldIcon = picker.querySelector('svg.label-icon'); if (oldIcon) { oldIcon.replaceChildren(...newIcon.cloneNode(true).childNodes); } } }); }, }; })();</script><template id="theme-icons"><svg aria-hidden="true" class="light astro-ptsxtnaf" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M5 12a1 1 0 0 0-1-1H3a1 1 0 0 0 0 2h1a1 1 0 0 0 1-1Zm.64 5-.71.71a1 1 0 0 0 0 1.41 1 1 0 0 0 1.41 0l.71-.71A1 1 0 0 0 5.64 17ZM12 5a1 1 0 0 0 1-1V3a1 1 0 0 0-2 0v1a1 1 0 0 0 1 1Zm5.66 2.34a1 1 0 0 0 .7-.29l.71-.71a1 1 0 1 0-1.41-1.41l-.66.71a1 1 0 0 0 0 1.41 1 1 0 0 0 .66.29Zm-12-.29a1 1 0 0 0 1.41 0 1 1 0 0 0 0-1.41l-.71-.71a1.004 1.004 0 1 0-1.43 1.41l.73.71ZM21 11h-1a1 1 0 0 0 0 2h1a1 1 0 0 0 0-2Zm-2.64 6A1 1 0 0 0 17 18.36l.71.71a1 1 0 0 0 1.41 0 1 1 0 0 0 0-1.41l-.76-.66ZM12 6.5a5.5 5.5 0 1 0 5.5 5.5A5.51 5.51 0 0 0 12 6.5Zm0 9a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7Zm0 3.5a1 1 0 0 0-1 1v1a1 1 0 0 0 2 0v-1a1 1 0 0 0-1-1Z"/></svg><svg aria-hidden="true" class="dark astro-ptsxtnaf" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M21.64 13a1 1 0 0 0-1.05-.14 8.049 8.049 0 0 1-3.37.73 8.15 8.15 0 0 1-8.14-8.1 8.59 8.59 0 0 1 .25-2A1 1 0 0 0 8 2.36a10.14 10.14 0 1 0 14 11.69 1 1 0 0 0-.36-1.05Zm-9.5 6.69A8.14 8.14 0 0 1 7.08 5.22v.27a10.15 10.15 0 0 0 10.14 10.14 9.784 9.784 0 0 0 2.1-.22 8.11 8.11 0 0 1-7.18 4.32v-.04Z"/></svg><svg aria-hidden="true" class="auto astro-ptsxtnaf" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M21 14h-1V7a3 3 0 0 0-3-3H7a3 3 0 0 0-3 3v7H3a1 1 0 0 0-1 1v2a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-2a1 1 0 0 0-1-1ZM6 7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v7H6V7Zm14 10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-1h16v1Z"/></svg></template><link rel="stylesheet" href="/_astro/print.ehPL0gv-.css" media="print"><link rel="stylesheet" href="/_astro/common.DtF9Eb9e.css"><style>@layer starlight.components{.card:where(.astro-a2rvmkxa){--sl-card-border:var(--sl-color-purple);--sl-card-bg:var(--sl-color-purple-low);border:1px solid var(--sl-color-gray-5);background-color:var(--sl-color-black);flex-direction:column;gap:clamp(.5rem,.125rem + 1vw,1rem);padding:clamp(1rem,.125rem + 3vw,2.5rem)}.card:where(.astro-a2rvmkxa):nth-child(4n+1){--sl-card-border:var(--sl-color-orange);--sl-card-bg:var(--sl-color-orange-low)}.card:where(.astro-a2rvmkxa):nth-child(4n+3){--sl-card-border:var(--sl-color-green);--sl-card-bg:var(--sl-color-green-low)}.card:where(.astro-a2rvmkxa):nth-child(4n+4){--sl-card-border:var(--sl-color-red);--sl-card-bg:var(--sl-color-red-low)}.card:where(.astro-a2rvmkxa):nth-child(4n+5){--sl-card-border:var(--sl-color-blue);--sl-card-bg:var(--sl-color-blue-low)}.title:where(.astro-a2rvmkxa){font-weight:600;font-size:var(--sl-text-h4);color:var(--sl-color-white);line-height:var(--sl-line-height-headings);align-items:center;gap:1rem}.card:where(.astro-a2rvmkxa) .icon:where(.astro-a2rvmkxa){border:1px solid var(--sl-card-border);background-color:var(--sl-card-bg);border-radius:.25rem;flex-shrink:0;padding:.2em}.card:where(.astro-a2rvmkxa) .body:where(.astro-a2rvmkxa){font-size:clamp(var(--sl-text-sm), calc(.5rem + 1vw), var(--sl-text-body));margin:0}.card-grid:where(.astro-ifd2y6lt){grid-template-columns:100%;gap:1rem;display:grid}.card-grid:where(.astro-ifd2y6lt)>*{margin-top:0!important}@media (width>=50rem){.card-grid:where(.astro-ifd2y6lt){grid-template-columns:1fr 1fr;gap:1.5rem}.stagger:where(.astro-ifd2y6lt){--stagger-height:5rem;padding-bottom:var(--stagger-height)}.stagger:where(.astro-ifd2y6lt)>:nth-child(2n){transform:translateY(var(--stagger-height))}}}@layer starlight.components{svg:where(.astro-ptsxtnaf){color:var(--sl-icon-color);font-size:var(--sl-icon-size,1em);width:1em;height:1em}}</style><script type="module" src="/_astro/page.Dwipeu-R.js"></script></head><body class="astro-cb6occid"><a class="sl-skip-link astro-j6vhcrlk" href="#_top">Skip to content</a><div class="page sl-flex astro-ujtqcm75"><header class="header astro-ujtqcm75"><div class="header astro-vxhxawco"><div class="title-wrapper sl-flex astro-vxhxawco"><a href="/" class="site-title sl-flex astro-7cswd53g"><img class="astro-7cswd53g" alt="A koala emoji" src="/_astro/koala.MvTCKGaP.png" width="512" height="512"><span class="astro-7cswd53g" translate="no">CLI Testing Library</span></a></div><div class="sl-flex print:hidden astro-vxhxawco"><site-search class="astro-vxhxawco astro-va2abzzk" data-translations="{"placeholder":"Search"}"><button data-open-modal disabled aria-label="Search" aria-keyshortcuts="Control+K" class="astro-va2abzzk"><svg aria-hidden="true" class="astro-va2abzzk astro-ptsxtnaf" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M21.71 20.29 18 16.61A9 9 0 1 0 16.61 18l3.68 3.68a.999.999 0 0 0 1.42 0 1 1 0 0 0 0-1.39ZM11 18a7 7 0 1 1 0-14 7 7 0 0 1 0 14Z"/></svg><span class="sl-hidden md:sl-block astro-va2abzzk" aria-hidden="true">Search</span><kbd class="sl-hidden md:sl-flex astro-va2abzzk" style="display: none;"><kbd class="astro-va2abzzk">Ctrl</kbd><kbd class="astro-va2abzzk">K</kbd></kbd></button><dialog style="padding:0" aria-label="Search" class="astro-va2abzzk"><div class="dialog-frame sl-flex astro-va2abzzk"><button data-close-modal class="sl-flex md:sl-hidden astro-va2abzzk">Cancel</button><div class="search-container astro-va2abzzk"><div id="starlight__search" class="astro-va2abzzk"></div></div></div></dialog></site-search><script> (() => { const openBtn = document.querySelector('button[data-open-modal]'); const shortcut = openBtn?.querySelector('kbd'); if (!openBtn || !(shortcut instanceof HTMLElement)) return; const platformKey = shortcut.querySelector('kbd'); if (platformKey && /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)) { platformKey.textContent = '⌘'; openBtn.setAttribute('aria-keyshortcuts', 'Meta+K'); } shortcut.style.display = ''; })();</script><script type="module" src="/_astro/Search.astro_astro_type_script_index_0_lang.CJxmhMpY.js"></script></div><div class="sl-hidden md:sl-flex print:hidden right-group astro-vxhxawco"><div class="sl-flex social-icons astro-vxhxawco"><a href="https://github.com/crutchcorn/cli-testing-library" rel="me" class="sl-flex astro-ckvhhkw7"><span class="sr-only astro-ckvhhkw7">GitHub</span><svg aria-hidden="true" class="astro-ckvhhkw7 astro-ptsxtnaf" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M12 .3a12 12 0 0 0-3.8 23.38c.6.12.83-.26.83-.57L9 21.07c-3.34.72-4.04-1.61-4.04-1.61-.55-1.39-1.34-1.76-1.34-1.76-1.08-.74.09-.73.09-.73 1.2.09 1.83 1.24 1.83 1.24 1.08 1.83 2.81 1.3 3.5 1 .1-.78.42-1.31.76-1.61-2.67-.3-5.47-1.33-5.47-5.93 0-1.31.47-2.38 1.24-3.22-.14-.3-.54-1.52.1-3.18 0 0 1-.32 3.3 1.23a11.5 11.5 0 0 1 6 0c2.28-1.55 3.29-1.23 3.29-1.23.64 1.66.24 2.88.12 3.18a4.65 4.65 0 0 1 1.23 3.22c0 4.61-2.8 5.63-5.48 5.92.42.36.81 1.1.81 2.22l-.01 3.29c0 .31.2.69.82.57A12 12 0 0 0 12 .3Z"/></svg></a></div><starlight-theme-select><label style="--sl-select-width: 6.25em" class="astro-stl7n4ow"><span class="sr-only astro-stl7n4ow">Select theme</span><svg aria-hidden="true" class="icon label-icon astro-stl7n4ow astro-ptsxtnaf" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M21 14h-1V7a3 3 0 0 0-3-3H7a3 3 0 0 0-3 3v7H3a1 1 0 0 0-1 1v2a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-2a1 1 0 0 0-1-1ZM6 7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v7H6V7Zm14 10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-1h16v1Z"/></svg><select autocomplete="off" class="astro-stl7n4ow"><option value="dark" class="astro-stl7n4ow">Dark</option><option value="light" class="astro-stl7n4ow">Light</option><option value="auto" selected class="astro-stl7n4ow">Auto</option></select><svg aria-hidden="true" class="icon caret astro-stl7n4ow astro-ptsxtnaf" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M17 9.17a1 1 0 0 0-1.41 0L12 12.71 8.46 9.17a1 1 0 1 0-1.41 1.42l4.24 4.24a1.002 1.002 0 0 0 1.42 0L17 10.59a1.002 1.002 0 0 0 0-1.42Z"/></svg></label></starlight-theme-select><script> StarlightThemeProvider.updatePickers();</script><script type="module">var e=`starlight-theme`,t=e=>e===`auto`||e===`dark`||e===`light`?e:`auto`,n=()=>t(typeof localStorage<`u`&&localStorage.getItem(e));function r(t){typeof localStorage<`u`&&localStorage.setItem(e,t===`light`||t===`dark`?t:``)}var i=()=>matchMedia(`(prefers-color-scheme: light)`).matches?`light`:`dark`;function a(e){StarlightThemeProvider.updatePickers(e),document.documentElement.dataset.theme=e===`auto`?i():e,r(e)}matchMedia(`(prefers-color-scheme: light)`).addEventListener(`change`,()=>{n()===`auto`&&a(`auto`)});var o=class extends HTMLElement{constructor(){super(),a(n()),this.querySelector(`select`)?.addEventListener(`change`,e=>{e.currentTarget instanceof HTMLSelectElement&&a(t(e.currentTarget.value))})}};customElements.define(`starlight-theme-select`,o);</script><script type="module">var e=class extends HTMLElement{constructor(){super();let e=this.querySelector(`select`);e&&(e.addEventListener(`change`,e=>{e.currentTarget instanceof HTMLSelectElement&&(window.location.pathname=e.currentTarget.value)}),window.addEventListener(`pageshow`,t=>{if(!t.persisted)return;let n=e.querySelector(`option[selected]`)?.index;n!==e.selectedIndex&&(e.selectedIndex=n??0)}))}};customElements.define(`starlight-lang-select`,e);</script></div></div></header><nav class="sidebar print:hidden astro-ujtqcm75" aria-label="Main"><starlight-menu-button class="print:hidden astro-w3egroy7"><button aria-expanded="false" aria-label="Menu" aria-controls="starlight__sidebar" class="sl-flex md:sl-hidden astro-w3egroy7"><svg aria-hidden="true" class="open-menu astro-w3egroy7 astro-ptsxtnaf" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M3 8h18a1 1 0 1 0 0-2H3a1 1 0 0 0 0 2Zm18 8H3a1 1 0 0 0 0 2h18a1 1 0 0 0 0-2Zm0-5H3a1 1 0 0 0 0 2h18a1 1 0 0 0 0-2Z"/></svg><svg aria-hidden="true" class="close-menu astro-w3egroy7 astro-ptsxtnaf" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="m13.41 12 6.3-6.29a1.004 1.004 0 1 0-1.42-1.42L12 10.59l-6.29-6.3a1.004 1.004 0 0 0-1.42 1.42l6.3 6.29-6.3 6.29a1 1 0 0 0 0 1.42.998.998 0 0 0 1.42 0l6.29-6.3 6.29 6.3a.999.999 0 0 0 1.42 0 1 1 0 0 0 0-1.42L13.41 12Z"/></svg></button></starlight-menu-button><script type="module">var e=class extends HTMLElement{btn=this.querySelector(`button`);constructor(){super(),this.btn.addEventListener(`click`,()=>this.toggleExpanded());let e=this.closest(`nav`);e&&e.addEventListener(`keyup`,e=>this.closeOnEscape(e)),matchMedia(`(min-width: 50em)`).addEventListener(`change`,()=>this.setExpanded(!1))}setExpanded(e){this.setAttribute(`aria-expanded`,String(e)),document.body.toggleAttribute(`data-mobile-menu-expanded`,e),document.querySelectorAll(`.main-frame, .sl-skip-link`).forEach(t=>{t.toggleAttribute(`inert`,e)})}toggleExpanded(){this.setExpanded(this.getAttribute(`aria-expanded`)!==`true`)}closeOnEscape(e){e.code===`Escape`&&(this.setExpanded(!1),this.btn.focus())}};customElements.define(`starlight-menu-button`,e);</script><div id="starlight__sidebar" class="sidebar-pane astro-ujtqcm75"><div class="sidebar-content sl-flex astro-ujtqcm75"><sl-sidebar-state-persist data-hash="1lip5zw" class="astro-7qm6w5to"><script aria-hidden="true"> (() => { try { if (!matchMedia('(min-width: 50em)').matches) return; /** @type {HTMLElement | null} */ const target = document.querySelector('sl-sidebar-state-persist'); const state = JSON.parse(sessionStorage.getItem('sl-sidebar-state') || '0'); if (!target || !state || target.dataset.hash !== state.hash) return; window._starlightScrollRestore = state.scroll; customElements.define( 'sl-sidebar-restore', class SidebarRestore extends HTMLElement { connectedCallback() { try { const idx = parseInt(this.dataset.index || ''); const details = this.closest('details'); if (details && typeof state.open[idx] === 'boolean') details.open = state.open[idx]; } catch {} } } ); } catch {} })(); </script><ul class="top-level astro-zv3s7ui4"><li class="astro-zv3s7ui4"><details open class="astro-zv3s7ui4"><summary class="astro-zv3s7ui4"><span class="group-label astro-zv3s7ui4"><span class="large astro-zv3s7ui4">Guides</span></span><svg aria-hidden="true" class="caret astro-zv3s7ui4 astro-ptsxtnaf" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg></summary><sl-sidebar-restore data-index="0"></sl-sidebar-restore><ul class="astro-zv3s7ui4"><li class="astro-zv3s7ui4"><a href="/guides/introduction/" class="astro-zv3s7ui4"><span class="astro-zv3s7ui4">Introduction</span></a></li><li class="astro-zv3s7ui4"><a href="/guides/migrating-from-v3-to-v4/" class="astro-zv3s7ui4"><span class="astro-zv3s7ui4">Migrating from v3 to v4</span></a></li><li class="astro-zv3s7ui4"><a href="/guides/api/" class="astro-zv3s7ui4"><span class="astro-zv3s7ui4">API</span></a></li><li class="astro-zv3s7ui4"><a href="/guides/configure/" class="astro-zv3s7ui4"><span class="astro-zv3s7ui4">Configuration Options</span></a></li><li class="astro-zv3s7ui4"><a href="/guides/debug/" class="astro-zv3s7ui4"><span class="astro-zv3s7ui4">Debug</span></a></li><li class="astro-zv3s7ui4"><a href="/guides/differences/" class="astro-zv3s7ui4"><span class="astro-zv3s7ui4">Differences Between CLI Testing Library & Testing Library</span></a></li><li class="astro-zv3s7ui4"><a href="/guides/fire-event/" class="astro-zv3s7ui4"><span class="astro-zv3s7ui4">Firing Events</span></a></li><li class="astro-zv3s7ui4"><a href="/guides/matchers/" class="astro-zv3s7ui4"><span class="astro-zv3s7ui4">Matchers</span></a></li><li class="astro-zv3s7ui4"><a href="/guides/queries/" class="astro-zv3s7ui4"><span class="astro-zv3s7ui4">About Queries</span></a></li><li class="astro-zv3s7ui4"><a href="/guides/user-event/" class="astro-zv3s7ui4"><span class="astro-zv3s7ui4">User Event</span></a></li></ul></details></li></ul><script aria-hidden="true"> (() => { const scroller = document.getElementById('starlight__sidebar'); if (!window._starlightScrollRestore || !scroller) return; scroller.scrollTop = window._starlightScrollRestore; delete window._starlightScrollRestore; })(); </script></sl-sidebar-state-persist><div class="md:sl-hidden"><div class="mobile-preferences sl-flex astro-5tecet73"><div class="social-icons astro-5tecet73"><a href="https://github.com/crutchcorn/cli-testing-library" rel="me" class="sl-flex astro-ckvhhkw7"><span class="sr-only astro-ckvhhkw7">GitHub</span><svg aria-hidden="true" class="astro-ckvhhkw7 astro-ptsxtnaf" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M12 .3a12 12 0 0 0-3.8 23.38c.6.12.83-.26.83-.57L9 21.07c-3.34.72-4.04-1.61-4.04-1.61-.55-1.39-1.34-1.76-1.34-1.76-1.08-.74.09-.73.09-.73 1.2.09 1.83 1.24 1.83 1.24 1.08 1.83 2.81 1.3 3.5 1 .1-.78.42-1.31.76-1.61-2.67-.3-5.47-1.33-5.47-5.93 0-1.31.47-2.38 1.24-3.22-.14-.3-.54-1.52.1-3.18 0 0 1-.32 3.3 1.23a11.5 11.5 0 0 1 6 0c2.28-1.55 3.29-1.23 3.29-1.23.64 1.66.24 2.88.12 3.18a4.65 4.65 0 0 1 1.23 3.22c0 4.61-2.8 5.63-5.48 5.92.42.36.81 1.1.81 2.22l-.01 3.29c0 .31.2.69.82.57A12 12 0 0 0 12 .3Z"/></svg></a></div><starlight-theme-select><label style="--sl-select-width: 6.25em" class="astro-stl7n4ow"><span class="sr-only astro-stl7n4ow">Select theme</span><svg aria-hidden="true" class="icon label-icon astro-stl7n4ow astro-ptsxtnaf" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M21 14h-1V7a3 3 0 0 0-3-3H7a3 3 0 0 0-3 3v7H3a1 1 0 0 0-1 1v2a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-2a1 1 0 0 0-1-1ZM6 7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v7H6V7Zm14 10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-1h16v1Z"/></svg><select autocomplete="off" class="astro-stl7n4ow"><option value="dark" class="astro-stl7n4ow">Dark</option><option value="light" class="astro-stl7n4ow">Light</option><option value="auto" selected class="astro-stl7n4ow">Auto</option></select><svg aria-hidden="true" class="icon caret astro-stl7n4ow astro-ptsxtnaf" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M17 9.17a1 1 0 0 0-1.41 0L12 12.71 8.46 9.17a1 1 0 1 0-1.41 1.42l4.24 4.24a1.002 1.002 0 0 0 1.42 0L17 10.59a1.002 1.002 0 0 0 0-1.42Z"/></svg></label></starlight-theme-select><script> StarlightThemeProvider.updatePickers();</script></div></div></div></div></nav><div class="main-frame astro-ujtqcm75"><script type="module">var e=document.getElementById(`starlight__sidebar`),t=e?.querySelector(`sl-sidebar-state-persist`),n=`sl-sidebar-state`,r=()=>{let r=[],i=t?.dataset.hash||``;try{let e=sessionStorage.getItem(n),t=JSON.parse(e||`{}`);Array.isArray(t.open)&&t.hash===i&&(r=t.open)}catch{}return{hash:i,open:r,scroll:e?.scrollTop||0}},i=e=>{try{sessionStorage.setItem(n,JSON.stringify(e))}catch{}},a=()=>i(r()),o=(e,t)=>{let n=r();n.open[t]=e,i(n)};t?.addEventListener(`click`,e=>{if(!(e.target instanceof Element))return;let t=e.target.closest(`summary`)?.closest(`details`);if(!t)return;let n=t.querySelector(`sl-sidebar-restore`),r=parseInt(n?.dataset.index||``);isNaN(r)||o(!t.open,r)}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&a()});</script><div class="lg:sl-flex astro-amlqcud2"><aside class="right-sidebar-container print:hidden astro-amlqcud2"><div class="right-sidebar astro-amlqcud2"><div class="lg:sl-hidden astro-bgackiw2"><mobile-starlight-toc data-min-h="2" data-max-h="3" class="astro-2gktxnoj"><nav aria-labelledby="starlight__on-this-page--mobile" class="astro-2gktxnoj"><details id="starlight__mobile-toc" class="astro-2gktxnoj"><summary id="starlight__on-this-page--mobile" class="sl-flex astro-2gktxnoj"><span class="toggle sl-flex astro-2gktxnoj">On this page<svg aria-hidden="true" class="caret astro-2gktxnoj astro-ptsxtnaf" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg></span><span class="display-current astro-2gktxnoj"></span></summary><div class="dropdown astro-2gktxnoj"><ul class="isMobile astro-g2tybha5" style="--depth: 0;"><li style="--depth: 0;" class="astro-g2tybha5"><a href="#_top" style="--depth: 0;" class="astro-g2tybha5"><span style="--depth: 0;" class="astro-g2tybha5">Overview</span></a></li><li style="--depth: 0;" class="astro-g2tybha5"><a href="#parameters" style="--depth: 0;" class="astro-g2tybha5"><span style="--depth: 0;" class="astro-g2tybha5">Parameters</span></a><ul class="isMobile astro-g2tybha5" style="--depth: 1;"><li style="--depth: 1;" class="astro-g2tybha5"><a href="#message" style="--depth: 1;" class="astro-g2tybha5"><span style="--depth: 1;" class="astro-g2tybha5">message</span></a></li><li style="--depth: 1;" class="astro-g2tybha5"><a href="#instance" style="--depth: 1;" class="astro-g2tybha5"><span style="--depth: 1;" class="astro-g2tybha5">instance</span></a></li></ul></li><li style="--depth: 0;" class="astro-g2tybha5"><a href="#returns" style="--depth: 0;" class="astro-g2tybha5"><span style="--depth: 0;" class="astro-g2tybha5">Returns</span></a></li></ul></div></details></nav></mobile-starlight-toc><script type="module" src="/_astro/MobileTableOfContents.astro_astro_type_script_index_0_lang.BcSo_yiZ.js"></script></div><div class="right-sidebar-panel sl-hidden lg:sl-block astro-bgackiw2"><div class="sl-container astro-bgackiw2"><starlight-toc data-min-h="2" data-max-h="3"><nav aria-labelledby="starlight__on-this-page"><h2 id="starlight__on-this-page">On this page</h2><ul class="astro-g2tybha5" style="--depth: 0;"><li style="--depth: 0;" class="astro-g2tybha5"><a href="#_top" style="--depth: 0;" class="astro-g2tybha5"><span style="--depth: 0;" class="astro-g2tybha5">Overview</span></a></li><li style="--depth: 0;" class="astro-g2tybha5"><a href="#parameters" style="--depth: 0;" class="astro-g2tybha5"><span style="--depth: 0;" class="astro-g2tybha5">Parameters</span></a><ul class="astro-g2tybha5" style="--depth: 1;"><li style="--depth: 1;" class="astro-g2tybha5"><a href="#message" style="--depth: 1;" class="astro-g2tybha5"><span style="--depth: 1;" class="astro-g2tybha5">message</span></a></li><li style="--depth: 1;" class="astro-g2tybha5"><a href="#instance" style="--depth: 1;" class="astro-g2tybha5"><span style="--depth: 1;" class="astro-g2tybha5">instance</span></a></li></ul></li><li style="--depth: 0;" class="astro-g2tybha5"><a href="#returns" style="--depth: 0;" class="astro-g2tybha5"><span style="--depth: 0;" class="astro-g2tybha5">Returns</span></a></li></ul></nav></starlight-toc><script type="module" src="/_astro/TableOfContents.astro_astro_type_script_index_0_lang.Csloo1VZ.js"></script></div></div></div></aside><div class="main-pane astro-amlqcud2"><main data-pagefind-body class="astro-cb6occid" lang="en" dir="ltr"><div class="content-panel astro-wwdv5w6u"><div class="sl-container astro-wwdv5w6u"><h1 id="_top" class="astro-hgrvf6ge">getInstanceError</h1></div></div><div class="content-panel astro-wwdv5w6u"><div class="sl-container astro-wwdv5w6u"><div class="sl-markdown-content"><div class="sl-heading-wrapper level-h1"><h1 id="function-getinstanceerror">Function: getInstanceError()</h1><a class="sl-anchor-link" href="#function-getinstanceerror"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Function: getInstanceError()”</span></a></div><div class="expressive-code"><link rel="stylesheet" href="/_astro/ec.w36nc.css"><script type="module" src="/_astro/ec.0vx5m.js"></script><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="ts"><code><div class="ec-line"><div class="code"><span style="--0:#C792EA;--1:#8844AE">function</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3B61B0">getInstanceError</span><span style="--0:#D9F5DD;--1:#111111">(</span><span style="--1:#403F53"><span style="--0:#D7DBE0">message</span><span style="--0:#D6DEEB">, </span><span style="--0:#D7DBE0">instance</span></span><span style="--0:#D9F5DD;--1:#111111">)</span><span style="--0:#7FDBCA;--1:#096E72">:</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#FFCB8B;--1:#111111">Error</span><span style="--0:#D6DEEB;--1:#403F53">;</span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copy to clipboard" data-copied="Copied!" data-code="function getInstanceError(message, instance): Error;"><div></div></button></div></figure></div><p>Defined in: <a href="https://github.com/crutchcorn/cli-testing-library/blob/main/packages/cli-testing-library/src/query-helpers.ts#L26">query-helpers.ts:26</a></p><div class="sl-heading-wrapper level-h2"><h2 id="parameters">Parameters</h2><a class="sl-anchor-link" href="#parameters"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Parameters”</span></a></div><div class="sl-heading-wrapper level-h3"><h3 id="message">message</h3><a class="sl-anchor-link" href="#message"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “message”</span></a></div><p><code dir="auto">string</code> | <code dir="auto">null</code></p><div class="sl-heading-wrapper level-h3"><h3 id="instance">instance</h3><a class="sl-anchor-link" href="#instance"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “instance”</span></a></div><p><code dir="auto">TestInstance</code></p><div class="sl-heading-wrapper level-h2"><h2 id="returns">Returns</h2><a class="sl-anchor-link" href="#returns"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Returns”</span></a></div><p><code dir="auto">Error</code></p></div><footer class="sl-flex astro-eg5bm4ai"><div class="meta sl-flex astro-eg5bm4ai"></div><div class="pagination-links print:hidden astro-dxo2n4rx" dir="ltr"></div></footer></div></div></main></div></div></div></div></body></html>