On this page
Updated
What a test checks
A test gives the formatter a source exactly as the manual’s example describes it, and checks that the citation it writes matches the manual’s, down to the punctuation and the italics. If one character differs, the test fails. The whole suite runs on every pull request and every change to the main branch.
The citation tests live in four files, with 148 tests in all:
- test/cite-kinds.test.js
- Every kind of source in every style: 131 expected citations from published examples (MLA 9 31, APA 7 27, Chicago bibliography 18, Chicago notes 20, Chicago author-date 7, Harvard 16, IEEE 12).
- test/cite.test.js
- 44 tests of the MLA and APA rules: authors, dates, titles, pages and the in-text forms.
- test/cite-styles.test.js
- 62 tests of Chicago, Harvard and IEEE: notes, author-date, et al., numbering and the list order.
- test/cite-published.test.js
- 16 tests of published examples the guide pages needed that the other files did not already have. Each is listed below.
How a guide depends on a test
Each page on how to cite a kind of source names the test that pins its form. When the site is built, a page whose test does not exist stops the build. So there is no page for a form we could not check: an IEEE YouTube video, for example, waits until the IEEE Reference Guide’s video example is in the tests.
The rules around the examples, such as margins or when to use et al., come from the manuals as the editorial policy describes. Tests check the citations, not the prose.
The published examples
These are the examples in test/cite-published.test.js, read from the file when the site is built, so this list always matches the tests. Italics in the expected text are the italics the manual prints.
MLA 9: a newspaper article
Printed in: Purdue OWL, "MLA Works Cited: Periodicals", article in a newspaper.
The test expects
Brubaker, Bill. “New Health Center Targets County's Uninsured Patients.” Washington Post, 24 May 2007, p. LZ01.
Pins /cite/mla/newspaper-article.
APA 7: a Wikipedia entry, cited from its permanent link
Printed in: APA Publication Manual (7th ed.), 10.3, and APA Style, "Wikipedia references". The archived version is dated, so no retrieval date is needed.
The test expects
Oil painting. (2019, December 8). In Wikipedia. https://en.wikipedia.org/w/index.php?title=Oil_painting&oldid=929802398
Pins /cite/apa/wikipedia.
APA 7: a dictionary entry with a group author
Printed in: APA Publication Manual (7th ed.), 10.3, and APA Style, "Dictionary entry references".
The test expects
Merriam-Webster. (n.d.). Culture. In Merriam-Webster.com dictionary. Retrieved September 9, 2019, from https://www.merriam-webster.com/dictionary/culture
Pins /cite/apa/dictionary-entry.
APA 7: a TikTok video
Printed in: APA Style, "TikTok references": the Washington Post example.
The test expects
Washington Post [@washingtonpost]. (2019, December 3). News is all around us #frozen #newsroom #newspaper [Video]. TikTok. https://www.tiktok.com/@washingtonpost/video/6765886712896818437
Pins /cite/apa/tiktok.
APA 7: an Instagram video, titled by its first twenty words with no ellipsis
Printed in: APA Style, "Instagram references": the APA Public Interest Directorate example. APA prints only the caption's first twenty words; the words after them here stand in for the rest of it.
The test expects
APA Public Interest Directorate [@apapubint]. (2019, June 14). Male depression is serious, but many men try to ignore it or refuse treatment. Different men have different symptoms, but [Video]. Instagram. https://www.instagram.com/p/BysOqenB1v7/
Pins /cite/apa/instagram-post.
APA 7: a translated, republished book
Printed in: APA Publication Manual (7th ed.), 10.2, and APA Style, "Republished book references".
The test expects
Laplace, P. S. (1951). A philosophical essay on probabilities (F. W. Truscott & F. L. Emory, Trans.). Dover. (Original work published 1814)
Pins /cite/apa/translated-book.
APA 7: a map
Printed in: APA Style, "Map references": the racial dot map example.
The test expects
Cable, D. (2013). The racial dot map [Map]. University of Virginia, Weldon Cooper Center for Public Service. https://demographics.coopercenter.org/racial-dot-map
Pins /cite/apa/map.
APA 7: a painting in a museum
Printed in: APA Publication Manual (7th ed.), 10.14, and APA Style, "Artwork references".
The test expects
Wood, G. (1930). American gothic [Painting]. Art Institute of Chicago, Chicago, IL, United States.
Pins /cite/apa/artwork.
Chicago 18: an e-book read in Kindle
Printed in: The Chicago Manual of Style Online, Citation Quick Guide, electronic book (Austen), with no place of publication (CMOS 18).
The test expects
Austen, Jane. Pride and Prejudice. Penguin Classics, 2007. Kindle.
Jane Austen, Pride and Prejudice (Penguin Classics, 2007), chap. 23, Kindle.
Pins /cite/chicago/e-book.
Name particles typed after the given name stay words, never initials
Printed in: MLA Handbook (9th ed.), names: "Cervantes Saavedra, Miguel de". APA 7 as the University of Portsmouth's APA guide sets it out: Ludwig van Beethoven is "Beethoven, L. van". A particle typed with the surname ("de Beauvoir") stays there, as Macquarie University's APA 7 guide gives "de Beauvoir, S.".
The test expects
Cervantes Saavedra, Miguel de. Don Quixote. Translated by Edith Grossman, Ecco, 2003.
Cervantes, M. de. (2003). Don Quixote (E. Grossman, Trans.). Ecco.
Cervantes, Miguel de. Don Quixote. Translated by Edith Grossman. Ecco, 2003.
Cervantes, M. de (2003) Don Quixote. Translated by E. Grossman. Ecco.
M. de Cervantes, Don Quixote, trans. Edith Grossman. Ecco, 2003.
Beethoven, L. van, & de Beauvoir, S. (2000). T. P.
Pins /cite/mla/translated-book, /cite/harvard/translated-book.
Chicago 18 author-date: a reprint gives the first date, (1813) 2003, and [1813] 2003 in the text
Printed in: Monash University Library, "Chicago 18th B (author-date): Books and chapters", reprint or modern edition (CMOS 18 14.16): "Austen, Jane. (1813) 2003. Pride and Prejudice. T. Egerton. Reprint, Penguin Classics." and "(Austen [1813] 2003, 74)". The original publisher (T. Egerton) is optional and the formatter has no field for it, so the entry is compared without it. The Chicago Manual's own Q&A gives "(Dry [1983] 2022)".
The test expects
Austen, Jane. (1813) 2003. Pride and Prejudice. Reprint, Penguin Classics.
(Austen [1813] 2003, 74)
Austen, Jane. Pride and Prejudice. 1813. Reprint, Penguin Classics, 2003.
Jane Austen, Pride and Prejudice (1813; repr., Penguin Classics, 2003), 74.
IEEE: books with the city of publication (IEEE Reference Guide, v. 3.28.2025, books)
Printed in: The guide adds "ch. 13" before the pages; the formatter has no chapter-number field, so the rest is compared.
The test expects
B. Klaus and P. Horn, Robot Vision. Cambridge, MA, USA: MIT Press, 1986.
L. Stein, “Random patterns,” in Computers and You, J. S. Brake, Ed., New York, NY, USA: Wiley, 1994, pp. 55–70.
T. Ogura, “Electronic government and surveillance-oriented society,” in Theorizing Surveillance: The Panopticon and Beyond. Cullompton, U.K.: Willan, 2006, pp. 270–295.
W. R. Leonard and M. H. Crawford, Eds. Human Biology of Pastoral Populations. New York, NY, USA: Cambridge Univ. Press, 2002.
J.-L. Dessalles, Why We Talk: The Evolutionary Origins of Language, trans. James Grieve. Oxford, U.K.: Oxford Univ. Press, 2007.
P. B. Kurland and R. Lerner, Eds. The Founders’ Constitution. Chicago, IL, USA: Univ. of Chicago Press, 1987. Accessed: Feb. 28, 2010. [Online]. Available: http://press-pubs.uchicago.edu/founders/
Klaus, B., & Horn, P. (1986). Robot Vision. MIT Press.
Pins /cite/ieee/book, /cite/ieee/edited-book, /cite/ieee/textbook.
IEEE: an online video, with the owner and location (IEEE Reference Guide, v. 3.28.2025, online video)
Printed in:
The test expects
Doane Academy, Burlington, NJ, USA. Second Grade Bossy R. (Feb. 28, 2013). Accessed: Jun. 3, 2018. [Online Video]. Available: https://www.youtube.com/watch?v=PUKHo1Y-BcM
Pins /cite/ieee/youtube-video.
IEEE: a web page (IEEE Reference Guide, v. 3.28.2025, websites)
Printed in: The guide prints "[Online.]" in this one example and "[Online]." everywhere else; the formatter uses the latter.
The test expects
J. Smith. “Obama inaugurated as President.” CNN.com. Accessed: Feb. 1, 2009. [Online]. Available: http://www.cnn.com/POLITICS/01/21/obama_inaugurated/index.html
MLA 9: a time stamp as hours, minutes and seconds, the end of a range shortened
Printed in: MLA Handbook (9th ed.), time stamps: ("Hush" 00:03:16-17).
The test expects
(“Hush” 00:03:16-17)
(“Hush” 00:03:16-17)
(“Hush” 00:03:16)
(“Hush” 01:02:03)
(“Hush” 00:03:16-00:04:10)
(Boswell 2:45)
Chicago 18: a short title never ends on a word that leads into the rest of the title (CMOS 18 13.32)
Printed in: CMOS 18 13.33, as Douglas College quotes it: Hendershot, When the News Broke, 165-66.
The test expects
Lee, Ships Sailing, 4.
Hendershot, When the News Broke, 165–66.
What the tests do not cover
- What you type. The formatter writes what it is given. A wrong year or a misspelled name comes out wrong, well formatted. Check the details against the source.
- Lookups. A DOI, ISBN or link fills in details from Crossref, Open Library or the page itself. Those records can be incomplete; the form shows what is missing.
- Capitalization of a title you paste. The app suggests the case each style wants, and you can keep the title as typed. Proper nouns inside a title need your eye in APA and Harvard sentence case.
- Your instructor. A class rule beats the manual. Every guide says so.
Report a mistake
If a citation from Format disagrees with your manual, email support@formatwriter.com or use Send feedback in the app, with the page and the manual’s example. A confirmed mistake is fixed in the formatter with a new test for that example, so it stays fixed.