Add an example of working with ava
See original GitHub issueIs your feature request related to a problem? Please describe.
I can’t get Ava to work with Typescript and Nuxt. It’s very weird, but my project works npm run dev
is all fine, but then if I type npm run test
with ava not only do I get an error in the test about my types, but also when I run npm run dev
from this point on it stops working up until I remove package-lock.json and node_modules!
I believe (before I migrated to 2.11) on 2.0.0 I had a different problem but not this one though.
My ava configuration that I got from somewhere a year ago:
"ava": {
"compileEnhancements": false,
"extensions": [
"ts"
],
"extensions": ["ts"],
"files": [
"**/*.test.ts"
],
"sources": [
"src/**/*"
],
"require": [
"esm",
"ts-node/register"
],
"verbose": true
},
Describe the solution you’d like An example how to work with testing in Typescript on Nuxt 2.9+
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6
Top Results From Across the Web
Use and setup Ava at work
First, try Ava with one coworker: · From your smartphone, use Ava to caption what your co-worker is saying. · Then Invite your...
Read more >AVA User's Guide | Niemann Profiles
AVA User's Guide. Hiring, coaching and retaining top talent is a challenge. AVA profiles add an objective and scientific element to this endeavor....
Read more >How you can test your Node.js applications with Ava.js - Medium
In your working directory, create a package.json file and add the following packages: yarn add ava babel-register. Create a tests folder.
Read more >Testing with AVA - Miniflare
Enable ES modules mode, and add a new test script in package.json : ... For more examples of testing workers with AVA, Miniflare...
Read more >AVA Tutorial - YouTube
This is a recording of a tutorial I gave to my co- workers at a lunch 'n learn.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Anyone wanting to create a PR with minimal
ava
+TypeScript
setup ? 😃t.context
is ofunknown
type, thus adding property to it creates errorObject is of type 'unknown'.
To negotiate it, I had to store nuxt instance in the scope of script.Also,
nuxt
contains no typings forNuxt
andBuilder
, had to shim them toany
as people show in #44. Indeed, what a weird sight.Plus, E2E instructions are not being clear about running Nuxt with its plugins for testing components in isolation.