Giter Site home page Giter Site logo

playwright-typescript-module-bug's Introduction

Playwright Typescript + Module bug

Minimal reproduction of issue 15862. Using @playwright/test version 1.42.0.

Working example

Branch main is the working branch. Run npm test to verify baseline behaviour.

❯ npm test

> [email protected] test
> playwright test tests


Running 1 test using 1 worker

  ✓  1 tests/test.spec.ts:3:5 › it works (7ms)

  1 passed (220ms)

Broken example (.mts extension)

Switch to the mts-extension branch to and run the same command (npm test) to experience one flavour of "Unknown file extension"

❯ git checkout mts-extension
Switched to branch 'mts-extension'
❯ npm test

> [email protected] test
> playwright test tests

TypeError: Unknown file extension ".mts" for /[REDACTED]/playwright-typescript-module-bug/tests/test.spec.mts
Error: No tests found.
Make sure that arguments are regular expressions matching test files.
You may need to escape symbols like "$" or "*" and quote the arguments.

Broken example (type "module")

Switch to the type-module branch to and run the tests again to experience the second flavour of "Unknown file extension"

❯ git checkout type-module
Switched to branch 'type-module'
❯ npm test

> [email protected] test
> playwright test tests

TypeError: Unknown file extension ".ts" for /[REDACTED]/playwright-typescript-module-bug/tests/test.spec.ts
Error: No tests found.
Make sure that arguments are regular expressions matching test files.
You may need to escape symbols like "$" or "*" and quote the arguments.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.