Overview
The test is correct. "Attending a school with over 800 students was her worst nightmare." is proper grammar.
Details
In most cases, when a superlative is used directly before a noun, it takes a definite article, that is "the" comes before the superlative.
For example:
- John makes the best barbecue.
- The Empire State was the tallest building in the world when it was built.
- Anne thinks that Chopin was the finest composer ever.
However, when a possessive is also applied to the noun, the article is normally omitted.
For example:
- Red is my best color.
- fall is my favorite season.
- Three minutes, sixteen seconds is her fastest time.
- Fear is their most effective technique.
The example sentence in the question is of this type:
Attending a school with over 800 students was her worst nightmare.
When a superlative is used later in the sentence than the noun that it modifies, the article may be omitted.
For example:
- Of all the buildings in the world, the Empire State was tallest.
- Of all the buildings in the world, the Empire State was the tallest. (Both are correct and have the same meaning.)
- There were many women at the ball, but Judith was the prettiest.
- There were many women at the ball, but Judith was prettiest. (Both are correct and have the same meaning.)
When the superlative is actually being used to compare the same thing at different times or conditions, the article will often be omitted. In this construction the superlative does not directly precede a noun
For example:
- He is wisest when he has not been drinking.
- Phar Lap was fastest on sunny days.
- Wine is tastiest on a clear palate.
In these cases the superlative is really functioning as a comparative.
When a superlative is used as an adverb, rather than an adjective, an article may be omitted.
For example:
- He speaks several languages, but speaks English most fluently.
- Of all the players she runs fastest.
- Joan approached fastest.
In certain fixed phrases, a superlative without an article has become standard, perhaps idiomatic.
- The report was classified Most Secret.
- Our cat was awarded best in class.
- Hashing passwords is a best practice.
- Her classmates voted her most likely to succeed.
Sources