Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ava test() expression is not callable / has no call signatures #3349

Open
zavoloklom opened this issue Nov 10, 2024 · 1 comment
Open

Ava test() expression is not callable / has no call signatures #3349

zavoloklom opened this issue Nov 10, 2024 · 1 comment

Comments

@zavoloklom
Copy link

After updating Typescript from 5.5.4 to 5.6.3 i started to have an error

error TS2349: This expression is not callable.
  Type 'typeof import("<full_path_to_project>/node_modules/ava/entrypoints/main")' has no call signatures.

Version of ava - 6.2.0
Version of Typescript - 5.6.3
Version of tsimp - 2.0.12

ava config

export default {
  files: ['tests/**/*.spec.ts'],
  extensions: {
    ts: 'module',
  },
  nodeArguments: ['--import=tsimp/import', '--no-warnings'],
  timeout: '2m',
  serial: true,
  concurrency: 1,
};

test example

import test from 'ava';
import type { ExecutionContext } from 'ava';

test('example', (t: ExecutionContext) => {
  t.is('8080', '8080');
});

I expect not to have this warning from Typescript when using Ava.

There was similar issue #2539, but it's closed and nothing from comments there helping me (first of all because I can not use require syntax).

@novemberborn
Copy link
Member

Can you reproduce this outside of your project? With and without tsimp/import? Nothing would have changed in AVA so it suggests a problem elsewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants