I've recommended this book before: pesterbook
It's not the most up-to-date, but it does bring all the essential elements together in one place. You can also find Pester posts/videos, but they tend to deal only with specific areas and leave you to look for the rest of the material. The book starts with the basics and builds from there.
I'm not clear on what you want to do, though. Pester is geared toward unit testing. Your script (the one you want to test) should be doing the checking for the presence of the file, the integrity of the file, and the valid contents of the file. If there's a problem, your script should be the one to detect it and return some sort of recognizable message (e.g., throw an exception, return a string, return a numeric value, etc.) signifying the problem.
Pester can build a directory/file to provide (i.e., call) your script with data for each test case (e.g., missing directory, missing file, file in the wrong format, file contains the wrong data, directory/file/data all there, etc.) and then wait for a return value and check it for the value you expect your script to return when presented with the erroneous data. Pester will then report either a failure (i.e., the script didn't return the expected value), or success (i.e., the script detected the error being tested for and returned the expected value) . . . or, when presented with a correct set of data, the script produced the expected output.