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.

Test.todo typings may be wrong: error TS2345: Argument of type 'string' is not assignable to parameter of type 'ContextualTest'.

See original GitHub issue

Description

When using test.todo with Typescript, I pass in one string, like:

test.todo('Model should require attributes');

But I receive the error

 error TS2345: Argument of type 'string' is not assignable to parameter of type 'ContextualTest'.

When I try to compile before I run.

Test Source

import test from 'ava';

test.todo('Model should require attributes');

Error Message & Stack Trace

λ npm run build

> nodemodulesystem@0.0.0 build C:\Users\Justin\nodemodulesystem
> tsc

src/module/controller/controller.spec.ts(3,11): error TS2345: Argument of type 'string' is not assignable to parameter of type 'ContextualTest'.

Command-Line Arguments

I am not getting the error from this but I’ll include it anyways…

nyc ava **/*.spec.js

Relevant Links

https://github.com/JustinDFuller/NodeModuleSystem

Environment

Tell us which operating system you are using, as well as which versions of Node.js, npm, and AVA. Run the following to get it quickly:

Node.js v6.5.0
win32 10.0.14393
0.16.0
3.10.7

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
unionalcommented, Nov 22, 2016

Encounter the same issue. ava@0.17.0

// generated.d.ts
        ......
	export function todo(name: string, implementation: ContextualTest): void;
	export function todo(implementation: ContextualTest): void;
	export function todo(name: string, implementation: Macros<ContextualTestContext>, ...args: any[]): void;
	export function todo(implementation: Macros<ContextualTestContext>, ...args: any[]): void;
0reactions
novemberborncommented, Jan 20, 2017

Please try installing from master.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bountysource
Test.todo typings may be wrong: error TS2345: Argument of type 'string' is not assignable to parameter of type 'ContextualTest'.
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