Skip to content

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

Open
@zavoloklom

Description

@zavoloklom

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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions