suites-dev / suites

A testing meta-framework that simplifies unit testing by reducing boilerplate code and enabling developers to build comprehensive and reliable test suites
https://suites.dev
Apache License 2.0
369 stars 12 forks source link

docs refer to non existent type #497

Open soryy708 opened 1 week ago

soryy708 commented 1 week ago

Is there an existing issue for this?

Current behavior

Docs home page says to:

import { Mocked } from '@suites/unit';

https://suites.dev/docs

but it errors with

Module '"@suites/unit"' has no exported member 'Mocked'. ts(2305)

Minimum reproduction code

.

Steps to reproduce

Try to import Mocked

Expected behavior

Either the type should be exported by the library, or the docs should be updated to the correct type

Suites version

@suites/unit@3.0.0

Node.js version

v20.13.1

In which operating systems have you tested?

Other

No response

Maloric commented 1 week ago

Having the same issue. It looks like it should be imported from @suites/doubles.jest. Source file is here: https://github.com/suites-dev/suites/blob/master/packages/doubles/jest/src/types.ts

soryy708 commented 1 week ago

@Maloric are you using Yarn v1.x?

I reached out to the author, and he pointed me at:

Perhaps the docs home page should have a notice that links there

soryy708 commented 1 week ago

Looks like this issue relates to:

I propose we keep this issue open until the documentation is updated.