If you have this in a separate scripts.yaml, you’ll want to make sure that “test:” is at the left margin. You don’t use the “-” (minus sign) notation with scripts.
Be sure you’re using spaces to indent, not tabs. If you’re on windows, here’s some editing tips: