{
  "$schema": "../cases.schema.json",
  "format": 1,
  "domain": "municipality",
  "title": {
    "en": "Municipalities",
    "pt-BR": "Municípios"
  },
  "functions": [
    {
      "id": "municipality.getByCode",
      "level": "extended",
      "summary": "Looks up a Brazilian municipality by its 7-digit IBGE code.",
      "description": "Looks up a municipality by its 7-digit IBGE code.\n\n- `code` may be a string or a non-negative integer.\n- A string has every character that is not a digit removed first, as in 2.4.0: `\"355-030-8\"` and `\"3550308 SP\"` both find São Paulo.\n- A negative or fractional number is not read as a code and returns `null`.\n- The result has the code, the name and the state code. Each call returns a new object.\n- Returns `null` when the digits are not 7 or match no municipality.\n- JavaScript also keeps `getMunicipality({ code })`, deprecated, which returns a Promise of a `[name, stateCode]` pair (or `null`) instead of the object.",
      "params": [
        {
          "name": "code",
          "type": "string | number"
        }
      ],
      "returns": "Municipality?",
      "cases": [
        {
          "id": "municipality.getByCode#sao-paulo",
          "args": [
            "3550308"
          ],
          "expect": {
            "returns": {
              "code": "3550308",
              "name": "São Paulo",
              "stateCode": "SP"
            }
          }
        },
        {
          "id": "municipality.getByCode#number",
          "args": [
            3550308
          ],
          "expect": {
            "returns": {
              "code": "3550308",
              "name": "São Paulo",
              "stateCode": "SP"
            }
          }
        },
        {
          "id": "municipality.getByCode#boa-esperanca-do-norte",
          "args": [
            "5101837"
          ],
          "expect": {
            "returns": {
              "code": "5101837",
              "name": "Boa Esperança do Norte",
              "stateCode": "MT"
            }
          }
        },
        {
          "id": "municipality.getByCode#masked",
          "args": [
            "355-030-8"
          ],
          "expect": {
            "returns": {
              "code": "3550308",
              "name": "São Paulo",
              "stateCode": "SP"
            }
          }
        },
        {
          "id": "municipality.getByCode#[\"0000000\"]",
          "args": [
            "0000000"
          ],
          "expect": {
            "returns": null
          }
        },
        {
          "id": "municipality.getByCode#too-short",
          "args": [
            "123"
          ],
          "expect": {
            "returns": null
          }
        },
        {
          "id": "municipality.getByCode#too-long",
          "args": [
            "12345678"
          ],
          "expect": {
            "returns": null
          }
        },
        {
          "id": "municipality.getByCode#empty",
          "args": [
            ""
          ],
          "expect": {
            "returns": null
          }
        },
        {
          "id": "municipality.getByCode#[-3550308]",
          "args": [
            -3550308
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for a negative number, instead of dropping its sign"
        },
        {
          "id": "municipality.getByCode#[355030.8]",
          "args": [
            355030.8
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for a fractional number, instead of dropping its decimal point"
        },
        {
          "id": "municipality.getByCode#[3550308.5]",
          "args": [
            3550308.5
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for a fractional number, instead of dropping its decimal point"
        },
        {
          "id": "municipality.getByCode#[\"3550308 SP\"]",
          "args": [
            "3550308 SP"
          ],
          "expect": {
            "returns": {
              "code": "3550308",
              "name": "São Paulo",
              "stateCode": "SP"
            }
          },
          "note": "from the maintainer briefing, #596: every non-digit is removed from a string, as in 2.4.0"
        }
      ]
    },
    {
      "id": "municipality.getCodeByName",
      "level": "core",
      "summary": "Looks up the 7-digit IBGE code of a municipality by its name and state.",
      "description": "Returns the 7-digit IBGE code of a municipality, given its name and the code of its state.\n\n- Takes one object with `municipalityName` and `stateCode`, both required. The same name can belong to municipalities of different states (`Bom Jesus` exists in PI, RS and other states), so the state is required.\n- The name ignores accents, the cedilla and letter case (`ß` reads as `SS`). Runs of whitespace collapse into one space and the surrounding whitespace is trimmed, but a name written without a space the IBGE name has does not match (`saopaulo`). The hyphen of a name is kept.\n- `stateCode` ignores letter case and surrounding whitespace, as every function that takes a state does.\n- Returns the code as a string. Returns `null` when the state code is not a state, when no municipality of that state has that name, when the name is not a string or is empty, and when the parameters are missing or malformed.\n- The JavaScript function is synchronous and offline: it reads the bundled table of 5,571 municipalities, the same as `municipality.getByCode`. The Python function of the same name (`get_code_by_municipality_name(municipality_name, uf)`) asks the IBGE API over the network.\n- JavaScript also keeps `getMunicipality({ municipalityName, uf })`, deprecated, which answers the same way and returns a Promise.",
      "params": [
        {
          "name": "params",
          "type": "GetCodeByMunicipalityNameParams"
        }
      ],
      "returns": "string?",
      "cases": [
        {
          "id": "municipality.getCodeByName#[{\"municipalityName\":\"Conceição do Coité\",\"stateCode\":\"Ba\"}]",
          "args": [
            {
              "municipalityName": "Conceição do Coité",
              "stateCode": "Ba"
            }
          ],
          "expect": {
            "returns": "2908408"
          },
          "note": "JavaScript docs example; JavaScript's own test: should return the code of Conceição do Coité, as the Python library's example does"
        },
        {
          "id": "municipality.getCodeByName#[{\"municipalityName\":\"conceicao do coite\",\"stateCode\":\"BA\"}]",
          "args": [
            {
              "municipalityName": "conceicao do coite",
              "stateCode": "BA"
            }
          ],
          "expect": {
            "returns": "2908408"
          },
          "note": "JavaScript's own test: should ignore accents, the cedilla and casing in the name"
        },
        {
          "id": "municipality.getCodeByName#[{\"municipalityName\":\"CONCEIÇÃO DO COITÉ\",\"stateCode\":\"BA\"}]",
          "args": [
            {
              "municipalityName": "CONCEIÇÃO DO COITÉ",
              "stateCode": "BA"
            }
          ],
          "expect": {
            "returns": "2908408"
          },
          "note": "JavaScript's own test: should ignore accents, the cedilla and casing in the name"
        },
        {
          "id": "municipality.getCodeByName#[{\"municipalityName\":\"São Paulo\",\"stateCode\":\"SP\"}]",
          "args": [
            {
              "municipalityName": "São Paulo",
              "stateCode": "SP"
            }
          ],
          "expect": {
            "returns": "3550308"
          },
          "note": "JavaScript's own test: should ignore accents, the cedilla and casing in the name"
        },
        {
          "id": "municipality.getCodeByName#[{\"municipalityName\":\"sao paulo\",\"stateCode\":\"sp\"}]",
          "args": [
            {
              "municipalityName": "sao paulo",
              "stateCode": "sp"
            }
          ],
          "expect": {
            "returns": "3550308"
          },
          "note": "JavaScript docs example"
        },
        {
          "id": "municipality.getCodeByName#[{\"municipalityName\":\"  sao  paulo \",\"stateCode\":\"SP\"}]",
          "args": [
            {
              "municipalityName": "  sao  paulo ",
              "stateCode": "SP"
            }
          ],
          "expect": {
            "returns": "3550308"
          },
          "note": "JavaScript's own test: should collapse runs of whitespace and trim the name, but not join words"
        },
        {
          "id": "municipality.getCodeByName#[{\"municipalityName\":\"sao\\tpaulo\",\"stateCode\":\"SP\"}]",
          "args": [
            {
              "municipalityName": "sao\tpaulo",
              "stateCode": "SP"
            }
          ],
          "expect": {
            "returns": "3550308"
          },
          "note": "JavaScript's own test: should collapse runs of whitespace and trim the name, but not join words"
        },
        {
          "id": "municipality.getCodeByName#[{\"municipalityName\":\"saopaulo\",\"stateCode\":\"SP\"}]",
          "args": [
            {
              "municipalityName": "saopaulo",
              "stateCode": "SP"
            }
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should collapse runs of whitespace and trim the name, but not join words"
        },
        {
          "id": "municipality.getCodeByName#[{\"municipalityName\":\"Ceara-Mirim\",\"stateCode\":\"RN\"}]",
          "args": [
            {
              "municipalityName": "Ceara-Mirim",
              "stateCode": "RN"
            }
          ],
          "expect": {
            "returns": "2402600"
          },
          "note": "JavaScript's own test: should keep the hyphen of a name"
        },
        {
          "id": "municipality.getCodeByName#[{\"municipalityName\":\"Paßos\",\"stateCode\":\"MG\"}]",
          "args": [
            {
              "municipalityName": "Paßos",
              "stateCode": "MG"
            }
          ],
          "expect": {
            "returns": "3147907"
          },
          "note": "JavaScript's own test: should fold the casing to upper case, so ß reads as SS"
        },
        {
          "id": "municipality.getCodeByName#[{\"municipalityName\":\"São Paulo\",\"stateCode\":\" Sp \"}]",
          "args": [
            {
              "municipalityName": "São Paulo",
              "stateCode": " Sp "
            }
          ],
          "expect": {
            "returns": "3550308"
          },
          "note": "JavaScript's own test: should ignore casing and surrounding whitespace in the state code"
        },
        {
          "id": "municipality.getCodeByName#[{\"municipalityName\":\"Bom Jesus\",\"stateCode\":\"PI\"}]",
          "args": [
            {
              "municipalityName": "Bom Jesus",
              "stateCode": "PI"
            }
          ],
          "expect": {
            "returns": "2201903"
          },
          "note": "JavaScript's own test: should tell apart municipalities of the same name in different states"
        },
        {
          "id": "municipality.getCodeByName#[{\"municipalityName\":\"Bom Jesus\",\"stateCode\":\"RS\"}]",
          "args": [
            {
              "municipalityName": "Bom Jesus",
              "stateCode": "RS"
            }
          ],
          "expect": {
            "returns": "4302303"
          },
          "note": "JavaScript docs example; JavaScript's own test: should tell apart municipalities of the same name in different states"
        },
        {
          "id": "municipality.getCodeByName#[{\"municipalityName\":\"São Paulo\",\"stateCode\":\"RJ\"}]",
          "args": [
            {
              "municipalityName": "São Paulo",
              "stateCode": "RJ"
            }
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript docs example: no São Paulo in Rio de Janeiro"
        },
        {
          "id": "municipality.getCodeByName#[{\"municipalityName\":\"Município Inexistente\",\"stateCode\":\"RS\"}]",
          "args": [
            {
              "municipalityName": "Município Inexistente",
              "stateCode": "RS"
            }
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript docs example"
        },
        {
          "id": "municipality.getCodeByName#[{\"municipalityName\":\"São Paulo\",\"stateCode\":\"XX\"}]",
          "args": [
            {
              "municipalityName": "São Paulo",
              "stateCode": "XX"
            }
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for a state code that is not a state"
        },
        {
          "id": "municipality.getCodeByName#[{\"municipalityName\":\"São Paulo\",\"stateCode\":\"\"}]",
          "args": [
            {
              "municipalityName": "São Paulo",
              "stateCode": ""
            }
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for a state code that is not a state"
        },
        {
          "id": "municipality.getCodeByName#[{\"municipalityName\":\"São Paulo\",\"stateCode\":\"SPX\"}]",
          "args": [
            {
              "municipalityName": "São Paulo",
              "stateCode": "SPX"
            }
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for a state code that is not a state"
        },
        {
          "id": "municipality.getCodeByName#[{\"municipalityName\":\"\",\"stateCode\":\"SP\"}]",
          "args": [
            {
              "municipalityName": "",
              "stateCode": "SP"
            }
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for an empty name"
        },
        {
          "id": "municipality.getCodeByName#[{\"municipalityName\":\"   \",\"stateCode\":\"SP\"}]",
          "args": [
            {
              "municipalityName": "   ",
              "stateCode": "SP"
            }
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for an empty name"
        },
        {
          "id": "municipality.getCodeByName#[{\"municipalityName\":null,\"stateCode\":\"SP\"}]",
          "args": [
            {
              "municipalityName": null,
              "stateCode": "SP"
            }
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for arguments that are not strings"
        },
        {
          "id": "municipality.getCodeByName#[{\"municipalityName\":\"São Paulo\",\"stateCode\":null}]",
          "args": [
            {
              "municipalityName": "São Paulo",
              "stateCode": null
            }
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for arguments that are not strings"
        },
        {
          "id": "municipality.getCodeByName#[{\"municipalityName\":\"São Paulo\",\"stateCode\":35}]",
          "args": [
            {
              "municipalityName": "São Paulo",
              "stateCode": 35
            }
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for arguments that are not strings"
        }
      ]
    },
    {
      "id": "municipality.list",
      "level": "extended",
      "summary": "Returns Brazilian municipalities published by the IBGE, optionally filtered by state.",
      "description": "Returns the Brazilian municipalities published by the IBGE, sorted by name (pt-BR collation). It returns all of them, or those of one state.\n\n- Each entry has the 7-digit IBGE code, the name and the state code.\n- `stateCode` is matched ignoring case and surrounding whitespace: `\"sp\"` and `\" SP \"` return the 645 municipalities of São Paulo, as `\"SP\"` does. 2.4.0 matched case-sensitively and returned an empty list for `\"sp\"`.\n- Only an omitted `stateCode` returns the full list. An empty or unknown code returns an empty list.\n- Each call returns a new array of new objects.\n- JavaScript also keeps `getCities(state)`, deprecated, which returns only the names. It reads any falsy argument as the full list, where `getMunicipalities` returns an empty list for `null` and an empty string.",
      "params": [
        {
          "name": "stateCode",
          "type": "string",
          "optional": true
        }
      ],
      "returns": "Municipality[]",
      "cases": [
        {
          "id": "municipality.list#distrito-federal",
          "args": [
            "DF"
          ],
          "expect": {
            "returns": [
              {
                "code": "5300108",
                "name": "Brasília",
                "stateCode": "DF"
              }
            ]
          },
          "note": "Brasília is the only municipality of the DF"
        },
        {
          "id": "municipality.list#unknown-state",
          "args": [
            "ZZ"
          ],
          "expect": {
            "returns": []
          }
        },
        {
          "id": "municipality.list#lowercase",
          "args": [
            "df"
          ],
          "expect": {
            "returns": [
              {
                "code": "5300108",
                "name": "Brasília",
                "stateCode": "DF"
              }
            ]
          },
          "note": "changed in 2.5.0 (#604): the state code is read ignoring case and surrounding whitespace; 2.4.0 returned []"
        },
        {
          "id": "municipality.list#padded",
          "args": [
            "  DF  "
          ],
          "expect": {
            "returns": [
              {
                "code": "5300108",
                "name": "Brasília",
                "stateCode": "DF"
              }
            ]
          },
          "note": "changed in 2.5.0 (#604): the state code is read ignoring case and surrounding whitespace; 2.4.0 returned []"
        },
        {
          "id": "municipality.list#mixed-case",
          "args": [
            " Df\t"
          ],
          "expect": {
            "returns": [
              {
                "code": "5300108",
                "name": "Brasília",
                "stateCode": "DF"
              }
            ]
          },
          "note": "changed in 2.5.0 (#604): the state code is read ignoring case and surrounding whitespace; 2.4.0 returned []"
        },
        {
          "id": "municipality.list#roraima-lowercase",
          "args": [
            "rr"
          ],
          "expect": {
            "returns": [
              {
                "code": "1400050",
                "name": "Alto Alegre",
                "stateCode": "RR"
              },
              {
                "code": "1400027",
                "name": "Amajari",
                "stateCode": "RR"
              },
              {
                "code": "1400100",
                "name": "Boa Vista",
                "stateCode": "RR"
              },
              {
                "code": "1400159",
                "name": "Bonfim",
                "stateCode": "RR"
              },
              {
                "code": "1400175",
                "name": "Cantá",
                "stateCode": "RR"
              },
              {
                "code": "1400209",
                "name": "Caracaraí",
                "stateCode": "RR"
              },
              {
                "code": "1400233",
                "name": "Caroebe",
                "stateCode": "RR"
              },
              {
                "code": "1400282",
                "name": "Iracema",
                "stateCode": "RR"
              },
              {
                "code": "1400308",
                "name": "Mucajaí",
                "stateCode": "RR"
              },
              {
                "code": "1400407",
                "name": "Normandia",
                "stateCode": "RR"
              },
              {
                "code": "1400456",
                "name": "Pacaraima",
                "stateCode": "RR"
              },
              {
                "code": "1400472",
                "name": "Rorainópolis",
                "stateCode": "RR"
              },
              {
                "code": "1400506",
                "name": "São João da Baliza",
                "stateCode": "RR"
              },
              {
                "code": "1400605",
                "name": "São Luiz do Anauá",
                "stateCode": "RR"
              },
              {
                "code": "1400704",
                "name": "Uiramutã",
                "stateCode": "RR"
              }
            ]
          },
          "note": "changed in 2.5.0 (#604): the state code is read ignoring case and surrounding whitespace; 2.4.0 returned []; the 15 municipalities of Roraima"
        },
        {
          "id": "municipality.list#empty",
          "args": [
            ""
          ],
          "expect": {
            "returns": []
          },
          "note": "JavaScript's own test: only an omitted state code asks for the full list"
        },
        {
          "id": "municipality.list#[\"toString\"]",
          "args": [
            "toString"
          ],
          "expect": {
            "returns": []
          },
          "note": "JavaScript's own test: should return an empty list for a name inherited from Object.prototype"
        },
        {
          "id": "municipality.list#[\"constructor\"]",
          "args": [
            "constructor"
          ],
          "expect": {
            "returns": []
          },
          "note": "JavaScript's own test: should return an empty list for a name inherited from Object.prototype"
        },
        {
          "id": "municipality.list#[35]",
          "args": [
            35
          ],
          "expect": {
            "returns": []
          },
          "note": "JavaScript's own test: should return an empty list for a state code that is not a string"
        }
      ]
    },
    {
      "id": "municipality.listByAreaCode",
      "level": "extended",
      "summary": "Gets the Brazilian municipalities that dial a DDD (area code).",
      "description": "Returns the municipalities that dial a DDD (area code, the Código Nacional of the Plano Geral de Numeração).\n\n- `areaCode` is read as `areaCode.getInfo` reads it: a string with every non-digit removed (`\"(61)\"` works), or a non-negative integer.\n- Returns an empty list for a DDD outside the 67 in use, and for a negative or fractional number.\n- Order: first the municipalities of the state the DDD is seated in, then those of the other states in `AreaCodeInfo.stateCodes`. Inside each state, by name (pt-BR collation).\n- Four DDDs cross a state border: 61 also covers 12 municipalities of Goiás, 42 covers Porto União (SC), 47 covers Rio Negro (PR) and 49 covers Barracão (PR).\n- Each entry has the 7-digit IBGE code, the name and the state code. Each call returns a new array of new objects.",
      "params": [
        {
          "name": "areaCode",
          "type": "string | number"
        }
      ],
      "returns": "Municipality[]",
      "cases": [
        {
          "id": "municipality.listByAreaCode#brasilia-and-goias",
          "args": [
            "(61)"
          ],
          "expect": {
            "returns": [
              {
                "code": "5300108",
                "name": "Brasília",
                "stateCode": "DF"
              },
              {
                "code": "5200258",
                "name": "Águas Lindas de Goiás",
                "stateCode": "GO"
              },
              {
                "code": "5204003",
                "name": "Cabeceiras",
                "stateCode": "GO"
              },
              {
                "code": "5205497",
                "name": "Cidade Ocidental",
                "stateCode": "GO"
              },
              {
                "code": "5206206",
                "name": "Cristalina",
                "stateCode": "GO"
              },
              {
                "code": "5208004",
                "name": "Formosa",
                "stateCode": "GO"
              },
              {
                "code": "5212501",
                "name": "Luziânia",
                "stateCode": "GO"
              },
              {
                "code": "5215231",
                "name": "Novo Gama",
                "stateCode": "GO"
              },
              {
                "code": "5215603",
                "name": "Padre Bernardo",
                "stateCode": "GO"
              },
              {
                "code": "5217609",
                "name": "Planaltina",
                "stateCode": "GO"
              },
              {
                "code": "5219753",
                "name": "Santo Antônio do Descoberto",
                "stateCode": "GO"
              },
              {
                "code": "5221858",
                "name": "Valparaíso de Goiás",
                "stateCode": "GO"
              },
              {
                "code": "5222203",
                "name": "Vila Boa",
                "stateCode": "GO"
              }
            ]
          },
          "note": "from the maintainer briefing, #597: 13 municipalities, Brasília and 12 of Goiás"
        },
        {
          "id": "municipality.listByAreaCode#acre",
          "args": [
            68
          ],
          "expect": {
            "returns": [
              {
                "code": "1200013",
                "name": "Acrelândia",
                "stateCode": "AC"
              },
              {
                "code": "1200054",
                "name": "Assis Brasil",
                "stateCode": "AC"
              },
              {
                "code": "1200104",
                "name": "Brasiléia",
                "stateCode": "AC"
              },
              {
                "code": "1200138",
                "name": "Bujari",
                "stateCode": "AC"
              },
              {
                "code": "1200179",
                "name": "Capixaba",
                "stateCode": "AC"
              },
              {
                "code": "1200203",
                "name": "Cruzeiro do Sul",
                "stateCode": "AC"
              },
              {
                "code": "1200252",
                "name": "Epitaciolândia",
                "stateCode": "AC"
              },
              {
                "code": "1200302",
                "name": "Feijó",
                "stateCode": "AC"
              },
              {
                "code": "1200328",
                "name": "Jordão",
                "stateCode": "AC"
              },
              {
                "code": "1200336",
                "name": "Mâncio Lima",
                "stateCode": "AC"
              },
              {
                "code": "1200344",
                "name": "Manoel Urbano",
                "stateCode": "AC"
              },
              {
                "code": "1200351",
                "name": "Marechal Thaumaturgo",
                "stateCode": "AC"
              },
              {
                "code": "1200385",
                "name": "Plácido de Castro",
                "stateCode": "AC"
              },
              {
                "code": "1200807",
                "name": "Porto Acre",
                "stateCode": "AC"
              },
              {
                "code": "1200393",
                "name": "Porto Walter",
                "stateCode": "AC"
              },
              {
                "code": "1200401",
                "name": "Rio Branco",
                "stateCode": "AC"
              },
              {
                "code": "1200427",
                "name": "Rodrigues Alves",
                "stateCode": "AC"
              },
              {
                "code": "1200435",
                "name": "Santa Rosa do Purus",
                "stateCode": "AC"
              },
              {
                "code": "1200500",
                "name": "Sena Madureira",
                "stateCode": "AC"
              },
              {
                "code": "1200450",
                "name": "Senador Guiomard",
                "stateCode": "AC"
              },
              {
                "code": "1200609",
                "name": "Tarauacá",
                "stateCode": "AC"
              },
              {
                "code": "1200708",
                "name": "Xapuri",
                "stateCode": "AC"
              }
            ]
          },
          "note": "from the maintainer briefing, #597: the 22 municipalities of Acre"
        },
        {
          "id": "municipality.listByAreaCode#unassigned",
          "args": [
            "20"
          ],
          "expect": {
            "returns": []
          },
          "note": "from the maintainer briefing, #597"
        },
        {
          "id": "municipality.listByAreaCode#roraima",
          "args": [
            "95"
          ],
          "expect": {
            "returns": [
              {
                "code": "1400050",
                "name": "Alto Alegre",
                "stateCode": "RR"
              },
              {
                "code": "1400027",
                "name": "Amajari",
                "stateCode": "RR"
              },
              {
                "code": "1400100",
                "name": "Boa Vista",
                "stateCode": "RR"
              },
              {
                "code": "1400159",
                "name": "Bonfim",
                "stateCode": "RR"
              },
              {
                "code": "1400175",
                "name": "Cantá",
                "stateCode": "RR"
              },
              {
                "code": "1400209",
                "name": "Caracaraí",
                "stateCode": "RR"
              },
              {
                "code": "1400233",
                "name": "Caroebe",
                "stateCode": "RR"
              },
              {
                "code": "1400282",
                "name": "Iracema",
                "stateCode": "RR"
              },
              {
                "code": "1400308",
                "name": "Mucajaí",
                "stateCode": "RR"
              },
              {
                "code": "1400407",
                "name": "Normandia",
                "stateCode": "RR"
              },
              {
                "code": "1400456",
                "name": "Pacaraima",
                "stateCode": "RR"
              },
              {
                "code": "1400472",
                "name": "Rorainópolis",
                "stateCode": "RR"
              },
              {
                "code": "1400506",
                "name": "São João da Baliza",
                "stateCode": "RR"
              },
              {
                "code": "1400605",
                "name": "São Luiz do Anauá",
                "stateCode": "RR"
              },
              {
                "code": "1400704",
                "name": "Uiramutã",
                "stateCode": "RR"
              }
            ]
          }
        },
        {
          "id": "municipality.listByAreaCode#masked",
          "args": [
            "(0xx95)"
          ],
          "expect": {
            "returns": [
              {
                "code": "1400050",
                "name": "Alto Alegre",
                "stateCode": "RR"
              },
              {
                "code": "1400027",
                "name": "Amajari",
                "stateCode": "RR"
              },
              {
                "code": "1400100",
                "name": "Boa Vista",
                "stateCode": "RR"
              },
              {
                "code": "1400159",
                "name": "Bonfim",
                "stateCode": "RR"
              },
              {
                "code": "1400175",
                "name": "Cantá",
                "stateCode": "RR"
              },
              {
                "code": "1400209",
                "name": "Caracaraí",
                "stateCode": "RR"
              },
              {
                "code": "1400233",
                "name": "Caroebe",
                "stateCode": "RR"
              },
              {
                "code": "1400282",
                "name": "Iracema",
                "stateCode": "RR"
              },
              {
                "code": "1400308",
                "name": "Mucajaí",
                "stateCode": "RR"
              },
              {
                "code": "1400407",
                "name": "Normandia",
                "stateCode": "RR"
              },
              {
                "code": "1400456",
                "name": "Pacaraima",
                "stateCode": "RR"
              },
              {
                "code": "1400472",
                "name": "Rorainópolis",
                "stateCode": "RR"
              },
              {
                "code": "1400506",
                "name": "São João da Baliza",
                "stateCode": "RR"
              },
              {
                "code": "1400605",
                "name": "São Luiz do Anauá",
                "stateCode": "RR"
              },
              {
                "code": "1400704",
                "name": "Uiramutã",
                "stateCode": "RR"
              }
            ]
          }
        },
        {
          "id": "municipality.listByAreaCode#empty",
          "args": [
            ""
          ],
          "expect": {
            "returns": []
          },
          "note": "JavaScript's own test: should return an empty array for a DDD not in use"
        },
        {
          "id": "municipality.listByAreaCode#[\"DDD\"]",
          "args": [
            "DDD"
          ],
          "expect": {
            "returns": []
          },
          "note": "JavaScript's own test: should return an empty array for a DDD not in use"
        },
        {
          "id": "municipality.listByAreaCode#[-11]",
          "args": [
            -11
          ],
          "expect": {
            "returns": []
          },
          "note": "JavaScript's own test: should return an empty array for a DDD not in use"
        },
        {
          "id": "municipality.listByAreaCode#[1.1]",
          "args": [
            1.1
          ],
          "expect": {
            "returns": []
          }
        }
      ]
    }
  ]
}
