microsoft / playwright-test

Build a cross-browser end-to-end test suite with Playwright.
https://playwright.dev
Apache License 2.0
777 stars 34 forks source link

describe not exists or not a function #147

Closed dareksob closed 4 years ago

dareksob commented 4 years ago
const { it, describe, beforeAll, beforeEach, afterAll, afterEach } = require('@playwright/test');

describe('feature foo', () => {
  it('is working correctly', async ({ page }) => {
    // Test function
    // ...
  })
});

I get this error

TypeError: describe is not a function

"playwright-cli": "next",
"@playwright/test": "^0.9.10",
"@playwright/test-runner": "^0.9.22"
mxschmitt commented 4 years ago

Hi, the change is pretty new and not yet released. #145

dareksob commented 4 years ago

the it function also not work. The export of the include file not correct. I found the fixtures object which have the functions.

const {it} = require('@playwright/test').fixtures;

bashess commented 4 years ago

I have tried many things, but I can't get it work. The fixtures it doesn't have the page and context as argument. I have also tried different versions and link the current master as module but without success.

arjunattam commented 4 years ago

Thanks for trying it out, @dareksob and @turbobasti. This project is under active development and things are changing rapidly. Parts of the readme are outdated and are being updated. We are very close to sharing it more broadly. Stay tuned :)