Is there an existing issue for this?
Current behavior
The new Sociable API is not working properly. I tried to setup a minimal reproducible example in my repo.
const { unit, unitRef } = await TestBed.sociable(TestService).expose(TestSociableService).compile();
const testDependService = unitRef.get(TestDependService);
unit.test();
expect(testDependService.call).toHaveBeenCalledWith(true); // returns undefined, but should true
Minimum reproduction code
https://github.com/KostyaZgara/suites-expose-reproduce
Steps to reproduce
- Clone repo
- run
npm i
- run
npm run test-ts or npm run test-swc
Expected behavior
return method should not be mocked when exposing the class TestSociableService using .expose() API in sociable test. I'm expecting to have success assert check expect(testDependService.call).toHaveBeenCalledWith(true)
Suites version
"@suites/di.nestjs": "3.0.0", "@suites/doubles.jest": "3.0.0", "@suites/unit": "3.0.0",
Node.js version
20.11.1
In which operating systems have you tested?
Other
No response
Is there an existing issue for this?
Current behavior
The new Sociable API is not working properly. I tried to setup a minimal reproducible example in my repo.
Minimum reproduction code
https://github.com/KostyaZgara/suites-expose-reproduce
Steps to reproduce
npm inpm run test-tsornpm run test-swcExpected behavior
returnmethod should not be mocked when exposing the class TestSociableService using.expose()API in sociable test. I'm expecting to have success assert checkexpect(testDependService.call).toHaveBeenCalledWith(true)Suites version
"@suites/di.nestjs": "3.0.0", "@suites/doubles.jest": "3.0.0", "@suites/unit": "3.0.0",
Node.js version
20.11.1
In which operating systems have you tested?
Other
No response