nuxt / test-utils

🧪 Test utilities for Nuxt
http://nuxt.com/docs/getting-started/testing
MIT License
323 stars 84 forks source link

Missing types for @nuxt/test-utils/playwright #807

Closed ptylek closed 7 months ago

ptylek commented 7 months ago

Hey, Today I used patch-package to patch @nuxt/test-utils@3.12.0 for the project I'm working on.

Main branch already has these changes and it fixes issue where I am not able to import from @nuxt/test-utils/playwright due to missing types.

import { expect, test } from '@nuxt/test-utils/playwright'

Here is the diff that solved my problem:

diff --git a/node_modules/@nuxt/test-utils/package.json b/node_modules/@nuxt/test-utils/package.json
index 2bc5c2e..e0d7b15 100644
--- a/node_modules/@nuxt/test-utils/package.json
+++ b/node_modules/@nuxt/test-utils/package.json
@@ -23,6 +23,7 @@
     "dist",
     "config.d.ts",
     "e2e.d.ts",
+    "playwright.d.ts",
     "experimental.d.ts",
     "module.d.ts",
     "runtime.d.ts",
diff --git a/node_modules/@nuxt/test-utils/playwright.d.ts b/node_modules/@nuxt/test-utils/playwright.d.ts
new file mode 100644
index 0000000..1b71747
--- /dev/null
+++ b/node_modules/@nuxt/test-utils/playwright.d.ts
@@ -0,0 +1 @@
+export * from './dist/playwright'

But as I can see these changes are already on main branch. Is it possible to create minor release / tag in order to fix it? As you can see both playwright.d.ts and files inpackage.json are missing from 3.12.0 release.

Screenshot 2024-04-05 at 09 16 25
noriyuki-shimizu commented 7 months ago

I'm having the same problem with version @nuxt/test-utils@3.12.0

mxschmitt commented 7 months ago

Looks like already fixed in https://github.com/nuxt/test-utils/pull/797

noriyuki-shimizu commented 7 months ago

Thanks for the reply!

But as I can see these changes are already on main branch. Is it possible to create minor release / tag in order to fix it? As you can see both playwright.d.ts and files inpackage.json are missing from 3.12.0 release.

Looks like already fixed in https://github.com/nuxt/test-utils/pull/797

I'm waiting for the release of a fixed version :)

ptylek commented 7 months ago

Thanks @danielroe! 🙇🏻 New release: https://github.com/nuxt/test-utils/releases/tag/v3.12.1