playwright-test-commons - v0.8.0
    Preparing search index...

    Function schemaFilePath

    • Resolves the file for a schema name. The name comes from test code but still becomes a file path, so it is sanitized: .. is removed and characters other than letters, digits, /, _ and - become _.

      Parameters

      • schemasDir: string

        the schemas folder

      • name: string

        schema name, e.g. "posts/getPost"

      Returns string

      the absolute path, e.g. <schemasDir>/posts/getPost.schema.json

      Error if the name resolves outside schemasDir