question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add an example of working with ava

See original GitHub issue

Is 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:open
  • Created 4 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

2reactions
kevinmarreccommented, Jul 8, 2020

Anyone wanting to create a PR with minimal ava + TypeScript setup ? 😃

1reaction
vintproxcommented, May 17, 2020

t.context is of unknown type, thus adding property to it creates error Object is of type 'unknown'. To negotiate it, I had to store nuxt instance in the scope of script.

Also, nuxt contains no typings for Nuxt and Builder, had to shim them to any 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found