{
  "doc": {
    "id": "api/commands/should",
    "title": "cy.should()",
    "description": "Create an assertion in Cypress.",
    "section": "api",
    "source_path": "/llm/markdown/api/commands/should.md",
    "version": "5a232a3cf094b8f928b1179ce5af6a5046296fac",
    "updated_at": "2026-11-13T01:14:31.437Z",
    "headings": [
      {
        "id": "api/commands/should#should",
        "text": "should",
        "level": 1
      },
      {
        "id": "api/commands/should#syntax",
        "text": "Syntax",
        "level": 2
      },
      {
        "id": "api/commands/should#usage",
        "text": "Usage",
        "level": 3
      },
      {
        "id": "api/commands/should#arguments",
        "text": "Arguments",
        "level": 3
      },
      {
        "id": "api/commands/should#yields",
        "text": "Yields",
        "level": 3
      },
      {
        "id": "api/commands/should#examples",
        "text": "Examples",
        "level": 2
      },
      {
        "id": "api/commands/should#chainers",
        "text": "Chainers",
        "level": 3
      },
      {
        "id": "api/commands/should#assert-the-checkbox-is-disabled",
        "text": "Assert the checkbox is disabled",
        "level": 4
      },
      {
        "id": "api/commands/should#the-current-dom-element-is-yielded",
        "text": "The current DOM element is yielded",
        "level": 4
      },
      {
        "id": "api/commands/should#value",
        "text": "Value",
        "level": 3
      },
      {
        "id": "api/commands/should#assert-the-class-is-form-horizontal",
        "text": "Assert the class is 'form-horizontal'",
        "level": 4
      },
      {
        "id": "api/commands/should#assert-the-value-is-not-jane",
        "text": "Assert the value is not 'Jane'",
        "level": 4
      },
      {
        "id": "api/commands/should#the-current-subject-is-yielded",
        "text": "The current subject is yielded",
        "level": 4
      },
      {
        "id": "api/commands/should#method-and-value",
        "text": "Method and Value",
        "level": 3
      },
      {
        "id": "api/commands/should#assert-the-anchor-element-has-href-attribute",
        "text": "Assert the anchor element has href attribute",
        "level": 4
      },
      {
        "id": "api/commands/should#assert-the-href-attribute-is-equal-to-users",
        "text": "Assert the href attribute is equal to '/users'",
        "level": 4
      },
      {
        "id": "api/commands/should#focus",
        "text": "Focus",
        "level": 3
      },
      {
        "id": "api/commands/should#assert-an-input-is-focused-after-button-click",
        "text": "Assert an input is focused after button click",
        "level": 4
      },
      {
        "id": "api/commands/should#function",
        "text": "Function",
        "level": 3
      },
      {
        "id": "api/commands/should#verify-length-content-and-classes-from-multiple-p",
        "text": "Verify length, content, and classes from multiple <p>",
        "level": 4
      },
      {
        "id": "api/commands/should#assert-class-name-contains-heading",
        "text": "Assert class name contains heading-",
        "level": 4
      },
      {
        "id": "api/commands/should#assert-text-content-of-3-elements",
        "text": "Assert text content of 3 elements",
        "level": 4
      },
      {
        "id": "api/commands/should#compare-text-values-of-two-elements",
        "text": "Compare text values of two elements",
        "level": 4
      },
      {
        "id": "api/commands/should#multiple-assertions",
        "text": "Multiple Assertions",
        "level": 3
      },
      {
        "id": "api/commands/should#chaining-multiple-assertions",
        "text": "Chaining multiple assertions",
        "level": 4
      },
      {
        "id": "api/commands/should#wait-until-the-assertions-pass",
        "text": "Wait until the assertions pass",
        "level": 3
      },
      {
        "id": "api/commands/should#notes",
        "text": "Notes",
        "level": 2
      },
      {
        "id": "api/commands/should#subjects",
        "text": "Subjects",
        "level": 3
      },
      {
        "id": "api/commands/should#how-do-i-know-which-assertions-change-the-subject-and-which-keep-it-the-same",
        "text": "How do I know which assertions change the subject and which keep it the same?",
        "level": 4
      },
      {
        "id": "api/commands/should#using-a-callback-function-will-not-change-what-is-yielded",
        "text": "Using a callback function will not change what is yielded",
        "level": 4
      },
      {
        "id": "api/commands/should#retry-boundaries",
        "text": "Retry boundaries",
        "level": 3
      },
      {
        "id": "api/commands/should#an-assertion-in-the-middle-of-a-chain-locks-in-the-subject",
        "text": "An assertion in the middle of a chain locks in the subject",
        "level": 4
      },
      {
        "id": "api/commands/should#an-action-command-locks-in-the-element-it-acted-on",
        "text": "An action command locks in the element it acted on",
        "level": 4
      },
      {
        "id": "api/commands/should#differences",
        "text": "Differences",
        "level": 3
      },
      {
        "id": "api/commands/should#whats-the-difference-between-then-and-should-and",
        "text": "What's the difference between .then() and .should()/.and()?",
        "level": 3
      },
      {
        "id": "api/commands/should#rules",
        "text": "Rules",
        "level": 2
      },
      {
        "id": "api/commands/should#requirements",
        "text": "Requirements",
        "level": 3
      },
      {
        "id": "api/commands/should#timeouts",
        "text": "Timeouts",
        "level": 3
      },
      {
        "id": "api/commands/should#command-log",
        "text": "Command Log",
        "level": 2
      },
      {
        "id": "api/commands/should#history",
        "text": "History",
        "level": 2
      },
      {
        "id": "api/commands/should#see-also",
        "text": "See also",
        "level": 2
      }
    ]
  },
  "chunks": [
    {
      "id": "api/commands/should#syntax",
      "doc_id": "api/commands/should",
      "heading": "Syntax",
      "heading_level": 2,
      "content_markdown": "## Syntax\n\n```\n.should(chainers)\n.should(chainers, value)\n.should(chainers, method, value)\n.should(callbackFn)\n```\n\n### Usage\n\n**Correct Usage**\n\n```\ncy.get('.error').should('be.empty') // Assert that '.error' is empty\ncy.contains('Login').should('be.visible') // Assert that el is visible\ncy.wrap({ foo: 'bar' }).its('foo').should('eq', 'bar') // Assert the 'foo' property equals 'bar'\n```\n\n**Incorrect Usage**\n\n```\ncy.should('eq', '42') // Can not be chained off 'cy'\n\ncy.get('p').should(($p) => {\n  cy.log($p) // Can not invoke a Cypress command inside the callback\n})\n```\n\n### Arguments\n\n**chainers _(String)_**\n\nAny valid chainer that comes from [Chai](/llm/markdown/app/references/assertions.md#Chai) or [Chai-jQuery](/llm/markdown/app/references/assertions.md#Chai-jQuery) or [Sinon-Chai](/llm/markdown/app/references/assertions.md#Sinon-Chai).\n\n**value _(String)_**\n\nValue to assert against chainer.\n\n**method _(String)_**\n\nA method to be called on the chainer.\n\n**callbackFn _(Function)_**\n\nPass a function that can have any number of explicit assertions within it. Whatever was passed to the function is what is yielded.\n\n### Yields\n\nIn most cases, `.should()` yields the same subject it was given from the previous command.\n\n```\ncy.get('nav') // yields <nav>\n  .should('be.visible') // yields <nav>\n```\n\nHowever, some chainers change the subject. In the example below, the second `.should()` yields the string `sans-serif` because the chainer `have.css, 'font-family'` changes the subject.\n\n```\ncy.get('nav') // yields <nav>\n  .should('be.visible') // yields <nav>\n  .should('have.css', 'font-family') // yields 'sans-serif'\n  .and('match', /serif/) // yields 'sans-serif'\n```\n\nIt is _safe_ to chain further commands that rely on the subject after `.should()`. This is different from action commands such as [`.click()`](/llm/markdown/api/commands/click.md), where chaining further commands is unsafe.\n\nQueries chained after `.should()` do not retry from the start of the chain. If the DOM re-renders, they retry from the subject `.should()` yielded. See [Retry boundaries](#Retry-boundaries).\n",
      "section": "api",
      "anchors": [
        "syntax"
      ],
      "path": "/llm/json/chunked/api/commands/should.json",
      "token_estimate": 341
    },
    {
      "id": "api/commands/should#usage",
      "doc_id": "api/commands/should",
      "heading": "Usage",
      "heading_level": 3,
      "content_markdown": "### Usage\n\n**Correct Usage**\n\n```\ncy.get('.error').should('be.empty') // Assert that '.error' is empty\ncy.contains('Login').should('be.visible') // Assert that el is visible\ncy.wrap({ foo: 'bar' }).its('foo').should('eq', 'bar') // Assert the 'foo' property equals 'bar'\n```\n\n**Incorrect Usage**\n\n```\ncy.should('eq', '42') // Can not be chained off 'cy'\n\ncy.get('p').should(($p) => {\n  cy.log($p) // Can not invoke a Cypress command inside the callback\n})\n```\n",
      "section": "api",
      "anchors": [
        "usage"
      ],
      "path": "/llm/json/chunked/api/commands/should.json",
      "token_estimate": 80
    },
    {
      "id": "api/commands/should#arguments",
      "doc_id": "api/commands/should",
      "heading": "Arguments",
      "heading_level": 3,
      "content_markdown": "### Arguments\n\n**chainers _(String)_**\n\nAny valid chainer that comes from [Chai](/llm/markdown/app/references/assertions.md#Chai) or [Chai-jQuery](/llm/markdown/app/references/assertions.md#Chai-jQuery) or [Sinon-Chai](/llm/markdown/app/references/assertions.md#Sinon-Chai).\n\n**value _(String)_**\n\nValue to assert against chainer.\n\n**method _(String)_**\n\nA method to be called on the chainer.\n\n**callbackFn _(Function)_**\n\nPass a function that can have any number of explicit assertions within it. Whatever was passed to the function is what is yielded.\n",
      "section": "api",
      "anchors": [
        "arguments"
      ],
      "path": "/llm/json/chunked/api/commands/should.json",
      "token_estimate": 76
    },
    {
      "id": "api/commands/should#yields",
      "doc_id": "api/commands/should",
      "heading": "Yields",
      "heading_level": 3,
      "content_markdown": "### Yields\n\nIn most cases, `.should()` yields the same subject it was given from the previous command.\n\n```\ncy.get('nav') // yields <nav>\n  .should('be.visible') // yields <nav>\n```\n\nHowever, some chainers change the subject. In the example below, the second `.should()` yields the string `sans-serif` because the chainer `have.css, 'font-family'` changes the subject.\n\n```\ncy.get('nav') // yields <nav>\n  .should('be.visible') // yields <nav>\n  .should('have.css', 'font-family') // yields 'sans-serif'\n  .and('match', /serif/) // yields 'sans-serif'\n```\n\nIt is _safe_ to chain further commands that rely on the subject after `.should()`. This is different from action commands such as [`.click()`](/llm/markdown/api/commands/click.md), where chaining further commands is unsafe.\n\nQueries chained after `.should()` do not retry from the start of the chain. If the DOM re-renders, they retry from the subject `.should()` yielded. See [Retry boundaries](#Retry-boundaries).\n",
      "section": "api",
      "anchors": [
        "yields"
      ],
      "path": "/llm/json/chunked/api/commands/should.json",
      "token_estimate": 171
    },
    {
      "id": "api/commands/should#examples",
      "doc_id": "api/commands/should",
      "heading": "Examples",
      "heading_level": 2,
      "content_markdown": "## Examples\n\n### Chainers\n\n#### Assert the checkbox is disabled\n\n```\ncy.get(':checkbox').should('be.disabled')\n```\n\n#### The current DOM element is yielded\n\n```\ncy.get('option:first')\n  .should('be.selected')\n  .then(($option) => {\n    // $option is yielded\n  })\n```\n\n### Value\n\n#### Assert the class is 'form-horizontal'\n\n```\ncy.get('form').should('have.class', 'form-horizontal')\n```\n\n#### Assert the value is not 'Jane'\n\n```\ncy.get('input').should('not.have.value', 'Jane')\n```\n\n#### The current subject is yielded\n\n```\ncy.get('button')\n  .should('have.id', 'new-user')\n  .then(($button) => {\n    // $button is yielded\n  })\n```\n\n### Method and Value\n\n#### Assert the anchor element has href attribute\n\n```\n// have.attr comes from chai-jquery\ncy.get('#header a').should('have.attr', 'href')\n```\n\n#### Assert the href attribute is equal to '/users'\n\n```\ncy.get('#header a').should('have.attr', 'href', '/users')\n```\n\n**Note:** the `have.attr` assertion changes the subject from the original element to the attribute's value\n\n```\ncy.get('#header a') // yields the element\n  .should('have.attr', 'href') // yields the \"href\" attribute\n  .and('equal', '/users') // checks the \"href\" value\n```\n\n### Focus\n\n#### Assert an input is focused after button click\n\n```\ncy.get('#btn-focuses-input').click()\ncy.get('#input-receives-focus').should('have.focus') // equivalent to should('be.focused')\n```\n\n### Function\n\nPassing a function to `.should()` enables you to make multiple assertions on the yielded subject. This also gives you the opportunity to _massage_ what you'd like to assert on.\n\nBe sure _not_ to include any code that has side effects in your callback function. The callback function will be retried over and over again until no assertions within it throw.\n\nYou cannot invoke Cypress commands inside of a `.should()` callback function. Use Cypress commands before or after `.should()` instead.\n\n**Incorrect Usage**\n\n```\ncy.get('p').should(($p) => {\n  cy.log($p)\n  // ...\n})\n```\n\n**Correct Usage**\n\n```\n// run the command after the assertion\ncy.get('p')\n  .should(($p) => {\n    // ...\n  })\n  .then(($p) => {\n    cy.log($p)\n  })\n\n// or use .then() instead, which does not retry\ncy.get('p').then(($p) => {\n  // ...\n  cy.log($p)\n})\n```\n\n#### Verify length, content, and classes from multiple `<p>`\n\n```\n<div>\n  <p class=\"text-primary\">Hello World</p>\n  <p class=\"text-danger\">You have an error</p>\n  <p class=\"text-default\">Try again later</p>\n</div>\n```\n\n```\ncy.get('p').should(($p) => {\n  // should have found 3 elements\n  expect($p).to.have.length(3)\n\n  // make sure the first contains some text content\n  expect($p.first()).to.contain('Hello World')\n\n  // use jquery's map to grab all of their classes\n  // jquery's map returns a new jquery object\n  const classes = $p.map((i, el) => {\n    return Cypress.$(el).attr('class')\n  })\n\n  // call classes.get() to make this a plain array\n  expect(classes.get()).to.deep.eq([\n    'text-primary',\n    'text-danger',\n    'text-default',\n  ])\n})\n```\n\n**Warning** Any value returned from a `.should()` callback function will be ignored. The original subject will be yielded to the next command.\n\n```\ncy.get('p')\n  .should(($p) => {\n    expect($p).to.have.length(3)\n\n    return 'foo'\n  })\n  .then(($p) => {\n    // the argument $p will be the 3 elements, not \"foo\"\n  })\n```\n\n#### Assert class name contains `heading-`\n\n```\n<div class=\"docs-header\">\n  <div class=\"main-abc123 heading-xyz987\">Introduction</div>\n</div>\n```\n\n```\ncy.get('.docs-header')\n  .find('div')\n  // .should(cb) callback function will be retried\n  .should(($div) => {\n    expect($div).to.have.length(1)\n\n    const className = $div[0].className\n\n    expect(className).to.match(/heading-/)\n  })\n  // .then(cb) callback is not retried,\n  // it either passes or fails\n  .then(($div) => {\n    expect($div).to.have.text('Introduction')\n  })\n```\n\nYou can even throw your own errors from the callback function.\n\n```\ncy.get('.docs-header')\n  .find('div')\n  .should(($div) => {\n    if ($div.length !== 1) {\n      // you can throw your own errors\n      throw new Error('Did not find 1 element')\n    }\n\n    const className = $div[0].className\n\n    if (!className.match(/heading-/)) {\n      throw new Error(`No class \"heading-\" in ${className}`)\n    }\n  })\n```\n\n#### Assert text content of 3 elements\n\nExample below first asserts that there are 3 elements, and then checks the text content of each one.\n\n```\n<ul class=\"connectors-list\">\n  <li>Walk the dog</li>\n  <li>Feed the cat</li>\n  <li>Write JavaScript</li>\n</ul>\n```\n\n```\ncy.get('.connectors-list > li').should(($lis) => {\n  expect($lis).to.have.length(3)\n  expect($lis.eq(0)).to.contain('Walk the dog')\n  expect($lis.eq(1)).to.contain('Feed the cat')\n  expect($lis.eq(2)).to.contain('Write JavaScript')\n})\n```\n\nFor clarity you can pass a string message as a second argument to any `expect` assertion, see [Chai#expect](https://www.chaijs.com/guide/styles/#expect).\n\n```\ncy.get('.connectors-list > li').should(($lis) => {\n  expect($lis, '3 items').to.have.length(3)\n  expect($lis.eq(0), 'first item').to.contain('Walk the dog')\n  expect($lis.eq(1), 'second item').to.contain('Feed the cat')\n  expect($lis.eq(2), 'third item').to.contain('Write JavaScript')\n})\n```\n\nThese string messages will be shown in the Command Log giving each assertion more context.\n\n#### Compare text values of two elements\n\nThe example below gets the text contained within one element and saves it in a closure variable. Then the test gets the text in another element and asserts that the two text values are the same after normalizing.\n\n```\n<div class=\"company-details\">\n  <div class=\"title\">Acme Developers</div>\n  <div class=\"identifier\">ACMEDEVELOPERS</div>\n</div>\n```\n\n```\nconst normalizeText = (s) => s.replace(/\\s/g, '').toLowerCase()\n\n// will keep text from title element\nlet titleText\n\ncy.get('.company-details')\n  .find('.title')\n  .then(($title) => {\n    // save text from the first element\n    titleText = normalizeText($title.text())\n  })\n\ncy.get('.company-details')\n  .find('.identifier')\n  .should(($identifier) => {\n    // we can massage text before comparing\n    const idText = normalizeText($identifier.text())\n\n    // text from the title element should already be set\n    expect(idText, 'ID').to.equal(titleText)\n  })\n```\n\n### Multiple Assertions\n\n#### Chaining multiple assertions\n\nChain assertions together with [`.and()`](/llm/markdown/api/commands/and.md), which is identical to `.should()`.\n\n```\n// our subject is not changed by our first assertion,\n// so we can continue to use DOM based assertions\ncy.get('option:first').should('be.selected').and('have.value', 'Metallica')\n```\n\n### Wait until the assertions pass\n\nCypress doesn't resolve your commands until all of its assertions pass.\n\n```\n// Application Code\n$('button').click(function () {\n  $button = $(this)\n\n  setTimeout(() => {\n    $button.removeClass('inactive').addClass('active')\n  }, 1000)\n})\n```\n\n```\ncy.get('button')\n  .click()\n  .should('have.class', 'active')\n  .and('not.have.class', 'inactive')\n```\n",
      "section": "api",
      "anchors": [
        "examples"
      ],
      "path": "/llm/json/chunked/api/commands/should.json",
      "token_estimate": 1143
    },
    {
      "id": "api/commands/should#chainers",
      "doc_id": "api/commands/should",
      "heading": "Chainers",
      "heading_level": 3,
      "content_markdown": "### Chainers\n\n#### Assert the checkbox is disabled\n\n```\ncy.get(':checkbox').should('be.disabled')\n```\n\n#### The current DOM element is yielded\n\n```\ncy.get('option:first')\n  .should('be.selected')\n  .then(($option) => {\n    // $option is yielded\n  })\n```\n",
      "section": "api",
      "anchors": [
        "chainers"
      ],
      "path": "/llm/json/chunked/api/commands/should.json",
      "token_estimate": 40
    },
    {
      "id": "api/commands/should#value",
      "doc_id": "api/commands/should",
      "heading": "Value",
      "heading_level": 3,
      "content_markdown": "### Value\n\n#### Assert the class is 'form-horizontal'\n\n```\ncy.get('form').should('have.class', 'form-horizontal')\n```\n\n#### Assert the value is not 'Jane'\n\n```\ncy.get('input').should('not.have.value', 'Jane')\n```\n\n#### The current subject is yielded\n\n```\ncy.get('button')\n  .should('have.id', 'new-user')\n  .then(($button) => {\n    // $button is yielded\n  })\n```\n",
      "section": "api",
      "anchors": [
        "value"
      ],
      "path": "/llm/json/chunked/api/commands/should.json",
      "token_estimate": 56
    },
    {
      "id": "api/commands/should#method-and-value",
      "doc_id": "api/commands/should",
      "heading": "Method and Value",
      "heading_level": 3,
      "content_markdown": "### Method and Value\n\n#### Assert the anchor element has href attribute\n\n```\n// have.attr comes from chai-jquery\ncy.get('#header a').should('have.attr', 'href')\n```\n\n#### Assert the href attribute is equal to '/users'\n\n```\ncy.get('#header a').should('have.attr', 'href', '/users')\n```\n\n**Note:** the `have.attr` assertion changes the subject from the original element to the attribute's value\n\n```\ncy.get('#header a') // yields the element\n  .should('have.attr', 'href') // yields the \"href\" attribute\n  .and('equal', '/users') // checks the \"href\" value\n```\n",
      "section": "api",
      "anchors": [
        "method-and-value"
      ],
      "path": "/llm/json/chunked/api/commands/should.json",
      "token_estimate": 99
    },
    {
      "id": "api/commands/should#assert-the-href-attribute-is-equal-to-users",
      "doc_id": "api/commands/should",
      "heading": "Assert the href attribute is equal to '/users'",
      "heading_level": 4,
      "content_markdown": "#### Assert the href attribute is equal to '/users'\n\n```\ncy.get('#header a').should('have.attr', 'href', '/users')\n```\n\n**Note:** the `have.attr` assertion changes the subject from the original element to the attribute's value\n\n```\ncy.get('#header a') // yields the element\n  .should('have.attr', 'href') // yields the \"href\" attribute\n  .and('equal', '/users') // checks the \"href\" value\n```\n",
      "section": "api",
      "anchors": [
        "assert-the-href-attribute-is-equal-to-users"
      ],
      "path": "/llm/json/chunked/api/commands/should.json",
      "token_estimate": 69
    },
    {
      "id": "api/commands/should#function",
      "doc_id": "api/commands/should",
      "heading": "Function",
      "heading_level": 3,
      "content_markdown": "### Function\n\nPassing a function to `.should()` enables you to make multiple assertions on the yielded subject. This also gives you the opportunity to _massage_ what you'd like to assert on.\n\nBe sure _not_ to include any code that has side effects in your callback function. The callback function will be retried over and over again until no assertions within it throw.\n\nYou cannot invoke Cypress commands inside of a `.should()` callback function. Use Cypress commands before or after `.should()` instead.\n\n**Incorrect Usage**\n\n```\ncy.get('p').should(($p) => {\n  cy.log($p)\n  // ...\n})\n```\n\n**Correct Usage**\n\n```\n// run the command after the assertion\ncy.get('p')\n  .should(($p) => {\n    // ...\n  })\n  .then(($p) => {\n    cy.log($p)\n  })\n\n// or use .then() instead, which does not retry\ncy.get('p').then(($p) => {\n  // ...\n  cy.log($p)\n})\n```\n\n#### Verify length, content, and classes from multiple `<p>`\n\n```\n<div>\n  <p class=\"text-primary\">Hello World</p>\n  <p class=\"text-danger\">You have an error</p>\n  <p class=\"text-default\">Try again later</p>\n</div>\n```\n\n```\ncy.get('p').should(($p) => {\n  // should have found 3 elements\n  expect($p).to.have.length(3)\n\n  // make sure the first contains some text content\n  expect($p.first()).to.contain('Hello World')\n\n  // use jquery's map to grab all of their classes\n  // jquery's map returns a new jquery object\n  const classes = $p.map((i, el) => {\n    return Cypress.$(el).attr('class')\n  })\n\n  // call classes.get() to make this a plain array\n  expect(classes.get()).to.deep.eq([\n    'text-primary',\n    'text-danger',\n    'text-default',\n  ])\n})\n```\n\n**Warning** Any value returned from a `.should()` callback function will be ignored. The original subject will be yielded to the next command.\n\n```\ncy.get('p')\n  .should(($p) => {\n    expect($p).to.have.length(3)\n\n    return 'foo'\n  })\n  .then(($p) => {\n    // the argument $p will be the 3 elements, not \"foo\"\n  })\n```\n\n#### Assert class name contains `heading-`\n\n```\n<div class=\"docs-header\">\n  <div class=\"main-abc123 heading-xyz987\">Introduction</div>\n</div>\n```\n\n```\ncy.get('.docs-header')\n  .find('div')\n  // .should(cb) callback function will be retried\n  .should(($div) => {\n    expect($div).to.have.length(1)\n\n    const className = $div[0].className\n\n    expect(className).to.match(/heading-/)\n  })\n  // .then(cb) callback is not retried,\n  // it either passes or fails\n  .then(($div) => {\n    expect($div).to.have.text('Introduction')\n  })\n```\n\nYou can even throw your own errors from the callback function.\n\n```\ncy.get('.docs-header')\n  .find('div')\n  .should(($div) => {\n    if ($div.length !== 1) {\n      // you can throw your own errors\n      throw new Error('Did not find 1 element')\n    }\n\n    const className = $div[0].className\n\n    if (!className.match(/heading-/)) {\n      throw new Error(`No class \"heading-\" in ${className}`)\n    }\n  })\n```\n\n#### Assert text content of 3 elements\n\nExample below first asserts that there are 3 elements, and then checks the text content of each one.\n\n```\n<ul class=\"connectors-list\">\n  <li>Walk the dog</li>\n  <li>Feed the cat</li>\n  <li>Write JavaScript</li>\n</ul>\n```\n\n```\ncy.get('.connectors-list > li').should(($lis) => {\n  expect($lis).to.have.length(3)\n  expect($lis.eq(0)).to.contain('Walk the dog')\n  expect($lis.eq(1)).to.contain('Feed the cat')\n  expect($lis.eq(2)).to.contain('Write JavaScript')\n})\n```\n\nFor clarity you can pass a string message as a second argument to any `expect` assertion, see [Chai#expect](https://www.chaijs.com/guide/styles/#expect).\n\n```\ncy.get('.connectors-list > li').should(($lis) => {\n  expect($lis, '3 items').to.have.length(3)\n  expect($lis.eq(0), 'first item').to.contain('Walk the dog')\n  expect($lis.eq(1), 'second item').to.contain('Feed the cat')\n  expect($lis.eq(2), 'third item').to.contain('Write JavaScript')\n})\n```\n\nThese string messages will be shown in the Command Log giving each assertion more context.\n\n#### Compare text values of two elements\n\nThe example below gets the text contained within one element and saves it in a closure variable. Then the test gets the text in another element and asserts that the two text values are the same after normalizing.\n\n```\n<div class=\"company-details\">\n  <div class=\"title\">Acme Developers</div>\n  <div class=\"identifier\">ACMEDEVELOPERS</div>\n</div>\n```\n\n```\nconst normalizeText = (s) => s.replace(/\\s/g, '').toLowerCase()\n\n// will keep text from title element\nlet titleText\n\ncy.get('.company-details')\n  .find('.title')\n  .then(($title) => {\n    // save text from the first element\n    titleText = normalizeText($title.text())\n  })\n\ncy.get('.company-details')\n  .find('.identifier')\n  .should(($identifier) => {\n    // we can massage text before comparing\n    const idText = normalizeText($identifier.text())\n\n    // text from the title element should already be set\n    expect(idText, 'ID').to.equal(titleText)\n  })\n```\n",
      "section": "api",
      "anchors": [
        "function"
      ],
      "path": "/llm/json/chunked/api/commands/should.json",
      "token_estimate": 808
    },
    {
      "id": "api/commands/should#verify-length-content-and-classes-from-multiple-p",
      "doc_id": "api/commands/should",
      "heading": "Verify length, content, and classes from multiple <p>",
      "heading_level": 4,
      "content_markdown": "#### Verify length, content, and classes from multiple `<p>`\n\n```\n<div>\n  <p class=\"text-primary\">Hello World</p>\n  <p class=\"text-danger\">You have an error</p>\n  <p class=\"text-default\">Try again later</p>\n</div>\n```\n\n```\ncy.get('p').should(($p) => {\n  // should have found 3 elements\n  expect($p).to.have.length(3)\n\n  // make sure the first contains some text content\n  expect($p.first()).to.contain('Hello World')\n\n  // use jquery's map to grab all of their classes\n  // jquery's map returns a new jquery object\n  const classes = $p.map((i, el) => {\n    return Cypress.$(el).attr('class')\n  })\n\n  // call classes.get() to make this a plain array\n  expect(classes.get()).to.deep.eq([\n    'text-primary',\n    'text-danger',\n    'text-default',\n  ])\n})\n```\n\n**Warning** Any value returned from a `.should()` callback function will be ignored. The original subject will be yielded to the next command.\n\n```\ncy.get('p')\n  .should(($p) => {\n    expect($p).to.have.length(3)\n\n    return 'foo'\n  })\n  .then(($p) => {\n    // the argument $p will be the 3 elements, not \"foo\"\n  })\n```\n",
      "section": "api",
      "anchors": [
        "verify-length-content-and-classes-from-multiple-p"
      ],
      "path": "/llm/json/chunked/api/commands/should.json",
      "token_estimate": 184
    },
    {
      "id": "api/commands/should#assert-class-name-contains-heading",
      "doc_id": "api/commands/should",
      "heading": "Assert class name contains heading-",
      "heading_level": 4,
      "content_markdown": "#### Assert class name contains `heading-`\n\n```\n<div class=\"docs-header\">\n  <div class=\"main-abc123 heading-xyz987\">Introduction</div>\n</div>\n```\n\n```\ncy.get('.docs-header')\n  .find('div')\n  // .should(cb) callback function will be retried\n  .should(($div) => {\n    expect($div).to.have.length(1)\n\n    const className = $div[0].className\n\n    expect(className).to.match(/heading-/)\n  })\n  // .then(cb) callback is not retried,\n  // it either passes or fails\n  .then(($div) => {\n    expect($div).to.have.text('Introduction')\n  })\n```\n\nYou can even throw your own errors from the callback function.\n\n```\ncy.get('.docs-header')\n  .find('div')\n  .should(($div) => {\n    if ($div.length !== 1) {\n      // you can throw your own errors\n      throw new Error('Did not find 1 element')\n    }\n\n    const className = $div[0].className\n\n    if (!className.match(/heading-/)) {\n      throw new Error(`No class \"heading-\" in ${className}`)\n    }\n  })\n```\n",
      "section": "api",
      "anchors": [
        "assert-class-name-contains-heading"
      ],
      "path": "/llm/json/chunked/api/commands/should.json",
      "token_estimate": 141
    },
    {
      "id": "api/commands/should#assert-text-content-of-3-elements",
      "doc_id": "api/commands/should",
      "heading": "Assert text content of 3 elements",
      "heading_level": 4,
      "content_markdown": "#### Assert text content of 3 elements\n\nExample below first asserts that there are 3 elements, and then checks the text content of each one.\n\n```\n<ul class=\"connectors-list\">\n  <li>Walk the dog</li>\n  <li>Feed the cat</li>\n  <li>Write JavaScript</li>\n</ul>\n```\n\n```\ncy.get('.connectors-list > li').should(($lis) => {\n  expect($lis).to.have.length(3)\n  expect($lis.eq(0)).to.contain('Walk the dog')\n  expect($lis.eq(1)).to.contain('Feed the cat')\n  expect($lis.eq(2)).to.contain('Write JavaScript')\n})\n```\n\nFor clarity you can pass a string message as a second argument to any `expect` assertion, see [Chai#expect](https://www.chaijs.com/guide/styles/#expect).\n\n```\ncy.get('.connectors-list > li').should(($lis) => {\n  expect($lis, '3 items').to.have.length(3)\n  expect($lis.eq(0), 'first item').to.contain('Walk the dog')\n  expect($lis.eq(1), 'second item').to.contain('Feed the cat')\n  expect($lis.eq(2), 'third item').to.contain('Write JavaScript')\n})\n```\n\nThese string messages will be shown in the Command Log giving each assertion more context.\n",
      "section": "api",
      "anchors": [
        "assert-text-content-of-3-elements"
      ],
      "path": "/llm/json/chunked/api/commands/should.json",
      "token_estimate": 151
    },
    {
      "id": "api/commands/should#compare-text-values-of-two-elements",
      "doc_id": "api/commands/should",
      "heading": "Compare text values of two elements",
      "heading_level": 4,
      "content_markdown": "#### Compare text values of two elements\n\nThe example below gets the text contained within one element and saves it in a closure variable. Then the test gets the text in another element and asserts that the two text values are the same after normalizing.\n\n```\n<div class=\"company-details\">\n  <div class=\"title\">Acme Developers</div>\n  <div class=\"identifier\">ACMEDEVELOPERS</div>\n</div>\n```\n\n```\nconst normalizeText = (s) => s.replace(/\\s/g, '').toLowerCase()\n\n// will keep text from title element\nlet titleText\n\ncy.get('.company-details')\n  .find('.title')\n  .then(($title) => {\n    // save text from the first element\n    titleText = normalizeText($title.text())\n  })\n\ncy.get('.company-details')\n  .find('.identifier')\n  .should(($identifier) => {\n    // we can massage text before comparing\n    const idText = normalizeText($identifier.text())\n\n    // text from the title element should already be set\n    expect(idText, 'ID').to.equal(titleText)\n  })\n```\n",
      "section": "api",
      "anchors": [
        "compare-text-values-of-two-elements"
      ],
      "path": "/llm/json/chunked/api/commands/should.json",
      "token_estimate": 157
    },
    {
      "id": "api/commands/should#multiple-assertions",
      "doc_id": "api/commands/should",
      "heading": "Multiple Assertions",
      "heading_level": 3,
      "content_markdown": "### Multiple Assertions\n\n#### Chaining multiple assertions\n\nChain assertions together with [`.and()`](/llm/markdown/api/commands/and.md), which is identical to `.should()`.\n\n```\n// our subject is not changed by our first assertion,\n// so we can continue to use DOM based assertions\ncy.get('option:first').should('be.selected').and('have.value', 'Metallica')\n```\n",
      "section": "api",
      "anchors": [
        "multiple-assertions"
      ],
      "path": "/llm/json/chunked/api/commands/should.json",
      "token_estimate": 55
    },
    {
      "id": "api/commands/should#chaining-multiple-assertions",
      "doc_id": "api/commands/should",
      "heading": "Chaining multiple assertions",
      "heading_level": 4,
      "content_markdown": "#### Chaining multiple assertions\n\nChain assertions together with [`.and()`](/llm/markdown/api/commands/and.md), which is identical to `.should()`.\n\n```\n// our subject is not changed by our first assertion,\n// so we can continue to use DOM based assertions\ncy.get('option:first').should('be.selected').and('have.value', 'Metallica')\n```\n",
      "section": "api",
      "anchors": [
        "chaining-multiple-assertions"
      ],
      "path": "/llm/json/chunked/api/commands/should.json",
      "token_estimate": 51
    },
    {
      "id": "api/commands/should#wait-until-the-assertions-pass",
      "doc_id": "api/commands/should",
      "heading": "Wait until the assertions pass",
      "heading_level": 3,
      "content_markdown": "### Wait until the assertions pass\n\nCypress doesn't resolve your commands until all of its assertions pass.\n\n```\n// Application Code\n$('button').click(function () {\n  $button = $(this)\n\n  setTimeout(() => {\n    $button.removeClass('inactive').addClass('active')\n  }, 1000)\n})\n```\n\n```\ncy.get('button')\n  .click()\n  .should('have.class', 'active')\n  .and('not.have.class', 'inactive')\n```\n",
      "section": "api",
      "anchors": [
        "wait-until-the-assertions-pass"
      ],
      "path": "/llm/json/chunked/api/commands/should.json",
      "token_estimate": 57
    },
    {
      "id": "api/commands/should#notes",
      "doc_id": "api/commands/should",
      "heading": "Notes",
      "heading_level": 2,
      "content_markdown": "## Notes\n\n### Subjects\n\n#### How do I know which assertions change the subject and which keep it the same?\n\nThe chainers that come from [Chai](/llm/markdown/app/references/bundled-libraries.md#Chai) or [Chai-jQuery](/llm/markdown/app/references/bundled-libraries.md#Chai-jQuery) will always document what they return.\n\n#### Using a callback function will not change what is yielded\n\nWhatever is returned in the function is ignored. Cypress always forces the command to yield the value from the previous cy command's yield (which in the example below is `<button>`)\n\n```\ncy.get('button')\n  .should(($button) => {\n    expect({ foo: 'bar' }).to.deep.eq({ foo: 'bar' })\n\n    return { foo: 'bar' } // return is ignored, .should() yields <button>\n  })\n  .then(($button) => {\n    // do anything we want with <button>\n  })\n```\n\n### Retry boundaries\n\n#### An assertion in the middle of a chain locks in the subject\n\n`.should()` and `.and()` retry as part of the command that precedes them. Once every assertion in the chain passes, Cypress locks in the subject at that point, so queries that come after it retry from that subject rather than from the top of the chain. If your application re-renders the DOM in that window, those later queries run against a detached element.\n\n```\ncy.get('.list')\n  .find('li')\n  .eq(2)\n  .should('contain', 'Header')\n  .and('be.visible') // once these pass, the li element is locked in\n  .children('.child') // if the DOM re-renders, this li may be detached\n```\n\nSplit the chain into separate statements so each one re-queries from the top. [Assertions as retry boundaries](/llm/markdown/app/core-concepts/retry-ability.md#Assertions-as-retry-boundaries) covers the pattern in full.\n\n#### An action command locks in the element it acted on\n\nAn action command such as [`.click()`](/llm/markdown/api/commands/click.md) locks in its subject the same way, so an assertion chained after it re-checks that element without re-querying for it. This is why asserting on a class the click toggles works, while asserting on an element the click replaces fails with `The subject is no longer attached to the DOM`.\n\n```\n// the click toggles classes on the same element\ncy.get('button').click().should('have.class', 'active')\n\n// if the click re-renders the button, alias it and query again\ncy.get('button').as('btn').click()\ncy.get('@btn').should('have.class', 'active')\n```\n\n### Differences\n\n### What's the difference between `.then()` and `.should()`/`.and()`?\n\n`.then()` hands the yielded subject to a callback function and should be used when you need to manipulate some values or do some actions.\n\nWhen using a callback function with `.should()` or `.and()`, on the other hand, there is special logic to rerun the callback function until no assertions throw within it. You should be careful of side effects in a `.should()` or `.and()` callback function that you would not want performed multiple times.\n",
      "section": "api",
      "anchors": [
        "notes"
      ],
      "path": "/llm/json/chunked/api/commands/should.json",
      "token_estimate": 560
    },
    {
      "id": "api/commands/should#subjects",
      "doc_id": "api/commands/should",
      "heading": "Subjects",
      "heading_level": 3,
      "content_markdown": "### Subjects\n\n#### How do I know which assertions change the subject and which keep it the same?\n\nThe chainers that come from [Chai](/llm/markdown/app/references/bundled-libraries.md#Chai) or [Chai-jQuery](/llm/markdown/app/references/bundled-libraries.md#Chai-jQuery) will always document what they return.\n\n#### Using a callback function will not change what is yielded\n\nWhatever is returned in the function is ignored. Cypress always forces the command to yield the value from the previous cy command's yield (which in the example below is `<button>`)\n\n```\ncy.get('button')\n  .should(($button) => {\n    expect({ foo: 'bar' }).to.deep.eq({ foo: 'bar' })\n\n    return { foo: 'bar' } // return is ignored, .should() yields <button>\n  })\n  .then(($button) => {\n    // do anything we want with <button>\n  })\n```\n",
      "section": "api",
      "anchors": [
        "subjects"
      ],
      "path": "/llm/json/chunked/api/commands/should.json",
      "token_estimate": 147
    },
    {
      "id": "api/commands/should#how-do-i-know-which-assertions-change-the-subject-and-which-keep-it-the-same",
      "doc_id": "api/commands/should",
      "heading": "How do I know which assertions change the subject and which keep it the same?",
      "heading_level": 4,
      "content_markdown": "#### How do I know which assertions change the subject and which keep it the same?\n\nThe chainers that come from [Chai](/llm/markdown/app/references/bundled-libraries.md#Chai) or [Chai-jQuery](/llm/markdown/app/references/bundled-libraries.md#Chai-jQuery) will always document what they return.\n",
      "section": "api",
      "anchors": [
        "how-do-i-know-which-assertions-change-the-subject-and-which-keep-it-the-same"
      ],
      "path": "/llm/json/chunked/api/commands/should.json",
      "token_estimate": 40
    },
    {
      "id": "api/commands/should#using-a-callback-function-will-not-change-what-is-yielded",
      "doc_id": "api/commands/should",
      "heading": "Using a callback function will not change what is yielded",
      "heading_level": 4,
      "content_markdown": "#### Using a callback function will not change what is yielded\n\nWhatever is returned in the function is ignored. Cypress always forces the command to yield the value from the previous cy command's yield (which in the example below is `<button>`)\n\n```\ncy.get('button')\n  .should(($button) => {\n    expect({ foo: 'bar' }).to.deep.eq({ foo: 'bar' })\n\n    return { foo: 'bar' } // return is ignored, .should() yields <button>\n  })\n  .then(($button) => {\n    // do anything we want with <button>\n  })\n```\n",
      "section": "api",
      "anchors": [
        "using-a-callback-function-will-not-change-what-is-yielded"
      ],
      "path": "/llm/json/chunked/api/commands/should.json",
      "token_estimate": 104
    },
    {
      "id": "api/commands/should#retry-boundaries",
      "doc_id": "api/commands/should",
      "heading": "Retry boundaries",
      "heading_level": 3,
      "content_markdown": "### Retry boundaries\n\n#### An assertion in the middle of a chain locks in the subject\n\n`.should()` and `.and()` retry as part of the command that precedes them. Once every assertion in the chain passes, Cypress locks in the subject at that point, so queries that come after it retry from that subject rather than from the top of the chain. If your application re-renders the DOM in that window, those later queries run against a detached element.\n\n```\ncy.get('.list')\n  .find('li')\n  .eq(2)\n  .should('contain', 'Header')\n  .and('be.visible') // once these pass, the li element is locked in\n  .children('.child') // if the DOM re-renders, this li may be detached\n```\n\nSplit the chain into separate statements so each one re-queries from the top. [Assertions as retry boundaries](/llm/markdown/app/core-concepts/retry-ability.md#Assertions-as-retry-boundaries) covers the pattern in full.\n\n#### An action command locks in the element it acted on\n\nAn action command such as [`.click()`](/llm/markdown/api/commands/click.md) locks in its subject the same way, so an assertion chained after it re-checks that element without re-querying for it. This is why asserting on a class the click toggles works, while asserting on an element the click replaces fails with `The subject is no longer attached to the DOM`.\n\n```\n// the click toggles classes on the same element\ncy.get('button').click().should('have.class', 'active')\n\n// if the click re-renders the button, alias it and query again\ncy.get('button').as('btn').click()\ncy.get('@btn').should('have.class', 'active')\n```\n",
      "section": "api",
      "anchors": [
        "retry-boundaries"
      ],
      "path": "/llm/json/chunked/api/commands/should.json",
      "token_estimate": 299
    },
    {
      "id": "api/commands/should#an-assertion-in-the-middle-of-a-chain-locks-in-the-subject",
      "doc_id": "api/commands/should",
      "heading": "An assertion in the middle of a chain locks in the subject",
      "heading_level": 4,
      "content_markdown": "#### An assertion in the middle of a chain locks in the subject\n\n`.should()` and `.and()` retry as part of the command that precedes them. Once every assertion in the chain passes, Cypress locks in the subject at that point, so queries that come after it retry from that subject rather than from the top of the chain. If your application re-renders the DOM in that window, those later queries run against a detached element.\n\n```\ncy.get('.list')\n  .find('li')\n  .eq(2)\n  .should('contain', 'Header')\n  .and('be.visible') // once these pass, the li element is locked in\n  .children('.child') // if the DOM re-renders, this li may be detached\n```\n\nSplit the chain into separate statements so each one re-queries from the top. [Assertions as retry boundaries](/llm/markdown/app/core-concepts/retry-ability.md#Assertions-as-retry-boundaries) covers the pattern in full.\n",
      "section": "api",
      "anchors": [
        "an-assertion-in-the-middle-of-a-chain-locks-in-the-subject"
      ],
      "path": "/llm/json/chunked/api/commands/should.json",
      "token_estimate": 168
    },
    {
      "id": "api/commands/should#an-action-command-locks-in-the-element-it-acted-on",
      "doc_id": "api/commands/should",
      "heading": "An action command locks in the element it acted on",
      "heading_level": 4,
      "content_markdown": "#### An action command locks in the element it acted on\n\nAn action command such as [`.click()`](/llm/markdown/api/commands/click.md) locks in its subject the same way, so an assertion chained after it re-checks that element without re-querying for it. This is why asserting on a class the click toggles works, while asserting on an element the click replaces fails with `The subject is no longer attached to the DOM`.\n\n```\n// the click toggles classes on the same element\ncy.get('button').click().should('have.class', 'active')\n\n// if the click re-renders the button, alias it and query again\ncy.get('button').as('btn').click()\ncy.get('@btn').should('have.class', 'active')\n```\n",
      "section": "api",
      "anchors": [
        "an-action-command-locks-in-the-element-it-acted-on"
      ],
      "path": "/llm/json/chunked/api/commands/should.json",
      "token_estimate": 127
    },
    {
      "id": "api/commands/should#whats-the-difference-between-then-and-should-and",
      "doc_id": "api/commands/should",
      "heading": "What's the difference between .then() and .should()/.and()?",
      "heading_level": 3,
      "content_markdown": "### What's the difference between `.then()` and `.should()`/`.and()`?\n\n`.then()` hands the yielded subject to a callback function and should be used when you need to manipulate some values or do some actions.\n\nWhen using a callback function with `.should()` or `.and()`, on the other hand, there is special logic to rerun the callback function until no assertions throw within it. You should be careful of side effects in a `.should()` or `.and()` callback function that you would not want performed multiple times.\n",
      "section": "api",
      "anchors": [
        "whats-the-difference-between-then-and-should-and"
      ],
      "path": "/llm/json/chunked/api/commands/should.json",
      "token_estimate": 109
    },
    {
      "id": "api/commands/should#rules",
      "doc_id": "api/commands/should",
      "heading": "Rules",
      "heading_level": 2,
      "content_markdown": "## Rules\n\n### Requirements\n\n*   `.should()` requires being chained off a previous command.\n\n### Timeouts\n\n*   `.should()` [retries](/llm/markdown/app/core-concepts/retry-ability.md) its specified assertions until they pass or it times out.\n\n```\n// timeout here will be passed down to the '.should()'\n// and it will retry for up to 10 secs\ncy.get('input', { timeout: 10000 }).should('have.value', '10')\n```\n\n```\n// timeout here will be passed down to the '.should()'\n// unless an assertion throws earlier,\n// ALL of the assertions will retry for up to 10 secs\ncy.get('input', { timeout: 10000 }).should(($input) => {\n  expect($input).to.not.be.disabled\n  expect($input).to.not.have.class('error')\n  expect($input).to.have.value('US')\n})\n```\n",
      "section": "api",
      "anchors": [
        "rules"
      ],
      "path": "/llm/json/chunked/api/commands/should.json",
      "token_estimate": 129
    },
    {
      "id": "api/commands/should#timeouts",
      "doc_id": "api/commands/should",
      "heading": "Timeouts",
      "heading_level": 3,
      "content_markdown": "### Timeouts\n\n*   `.should()` [retries](/llm/markdown/app/core-concepts/retry-ability.md) its specified assertions until they pass or it times out.\n\n```\n// timeout here will be passed down to the '.should()'\n// and it will retry for up to 10 secs\ncy.get('input', { timeout: 10000 }).should('have.value', '10')\n```\n\n```\n// timeout here will be passed down to the '.should()'\n// unless an assertion throws earlier,\n// ALL of the assertions will retry for up to 10 secs\ncy.get('input', { timeout: 10000 }).should(($input) => {\n  expect($input).to.not.be.disabled\n  expect($input).to.not.have.class('error')\n  expect($input).to.have.value('US')\n})\n```\n",
      "section": "api",
      "anchors": [
        "timeouts"
      ],
      "path": "/llm/json/chunked/api/commands/should.json",
      "token_estimate": 112
    },
    {
      "id": "api/commands/should#command-log",
      "doc_id": "api/commands/should",
      "heading": "Command Log",
      "heading_level": 2,
      "content_markdown": "## Command Log\n\n**_Assert that there should be 8 children in a nav_**\n\n```\ncy.get('.left-nav>.nav').children().should('have.length', 8)\n```\n\nThe commands above will display in the Command Log as:\n\nWhen clicking on `assert` within the command log, the console outputs the following:\n",
      "section": "api",
      "anchors": [
        "command-log"
      ],
      "path": "/llm/json/chunked/api/commands/should.json",
      "token_estimate": 53
    },
    {
      "id": "api/commands/should#history",
      "doc_id": "api/commands/should",
      "heading": "History",
      "heading_level": 2,
      "content_markdown": "## History\n\n| Version | Changes |\n| --- | --- |\n| [11.0.0](/llm/markdown/app/references/changelog.md#11-0-0) | Throw error if Cypress command used in callback |\n| [0.11.4](/llm/markdown/app/references/changelog.md#0-11-4) | Allows callback function argument |\n| [< 0.3.3](/llm/markdown/app/references/changelog.md#0-3-3) | `.should()` command added |\n",
      "section": "api",
      "anchors": [
        "history"
      ],
      "path": "/llm/json/chunked/api/commands/should.json",
      "token_estimate": 53
    }
  ]
}