[
{ "name": "first and last name", "args": ["John Smith"], "expect": "JS" },
{ "name": "lower case and messy spacing", "args": [" john smith "], "expect": "JS" },
{ "name": "a hyphenated forename gives two letters", "args": ["Jean-Paul Sartre"], "expect": "JPS" },
{ "name": "dotted initials each count", "args": ["J.R.R. Tolkien"], "expect": "JRRT" },
{ "name": "a particle in the middle is skipped", "args": ["Ludwig van Beethoven"], "expect": "LB" },
{ "name": "two particles in the middle are both skipped", "args": ["José María de la Cruz"], "expect": "JMC" },
{ "name": "a particle as the first word counts", "args": ["Van Morrison"], "expect": "VM" },
{ "name": "an apostrophe does not split a surname", "args": ["Mary O'Brien"], "expect": "MO" },
{ "name": "accented letters are upper-cased", "args": ["émile zola"], "expect": "ÉZ" },
{ "name": "a single name gives one letter", "args": ["Madonna"], "expect": "M" },
{ "name": "leading brackets are skipped", "args": ["(John) Smith"], "expect": "JS" },
{ "name": "typographic quotes around a nickname are skipped", "args": ["Christopher “Kit” Marlowe"], "expect": "CKM" },
{ "name": "a script without case keeps its first characters", "args": ["李 小龙"], "expect": "李小" },
{ "name": "no-break spaces separate words", "args": ["Anne Marie"], "expect": "AM" },
{ "name": "the empty string has no initials", "args": [""], "expect": "" },
{ "name": "punctuation alone has no initials", "args": [" - . "], "expect": "" },
{ "name": "a name that is not a string is an error", "args": [null], "expectError": "initials needs a string" }
]