A common pitfall in JavaScript unit testing is writing a test where the expectation does not include an assertion. This results in a test that never fails regardless of the input, which means it does not effectively test the code.