{"_id":"ts-jest-mocker","_rev":"10-caa14a6028572ea97ae6b088252e8cf5","name":"ts-jest-mocker","dist-tags":{"latest":"1.3.0"},"versions":{"0.3.0":{"name":"ts-jest-mocker","version":"0.3.0","keywords":["jest","typescript","mock","class","interface"],"author":{"name":"Dario Snajder"},"license":"ISC","_id":"ts-jest-mocker@0.3.0","maintainers":[{"name":"dariosn85","email":"dariosn85.dev@gmail.com"}],"homepage":"https://github.com/dariosn85/ts-jest-mocker#readme","bugs":{"url":"https://github.com/dariosn85/ts-jest-mocker/issues"},"dist":{"shasum":"71c39fa87e6c279ed2966c627cac538c4af1b931","tarball":"https://registry.npmjs.org/ts-jest-mocker/-/ts-jest-mocker-0.3.0.tgz","fileCount":4,"integrity":"sha512-3dYiKIT3wCYCuR5RASmV/D4su+yVbIAUR1OpaTv+jwvO03aVfFCjRy+WRiFdUZb2M0EMW2+VV5gmbVeTs6OMPw==","signatures":[{"sig":"MEYCIQC6ZlfKQSLoFtdR983IFAntxDPXGo+EULWfNISEwg6QEAIhALD7kWbTHM5pTVeRgNrjgZedT3lGLdJFJNMn0n237qZc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2744,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjCg6zACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr/mg/+K8poY0p/t6nYGucCnohLi6dxq5jV7HI7CvO8nebZar6icm6t\r\n6h6NweedbaLUZ/7Res1tnzN1FSqQ0D2sKzYF7qyKVGn/lj+kSMOHifghfgs6\r\nPPnBLMDxeZP4EKlmPXVGmJDbRg62nUH8i6O6HPsMPAaKOb5Zo8FIr3Q4skZd\r\n2UqUO0Qlww8C5lRxgR+XsZPVjAA5evTnltTyqjlAD74ZxjWN96AiNG1Tw2N7\r\nNi4r7rPcSANBJlAyTUMmbGUV14RWQoeUhqkh+DYXIkpix90pW5PuxmBC/+RV\r\nfixWOHD7XeHET/sC41U5AUDTz3piBnGTih/ahWqCZPsrGkFwWDFlWlKi08F2\r\n3b1nKovuauK9JTOXkJf5tfe2YBFnK6yz8Cgu2ltPrm1vvfBcbi6gNj3CALPm\r\nh3v/H+q3lD7S5nvLh5/1iWtjNFMewZOSlnsKOH99+bYH6Pus1bpgYgHBy6aP\r\n93et/38C1O+DRs2Sfe9hkhc5zXKYyTt5QoRDsqJe2Rk0613coaqryik4MQrQ\r\nknmW7KaYtiY4pHxTNZkMUmlvJlKndvxeu1nGNGsDWH/g9ZE5P0EX/zcdshgu\r\nv2Aiu3h1mb+SEWro6uMv946lU0XDP5HQ/qI4/z4+V9S/sP8lUms1GSxY8VA8\r\nPgiSNzssCkfatIxhoyLt+Efd51fMJvLRICg=\r\n=W5oa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/ts-jest-mocker.js","gitHead":"158dbc9629f738364772357d4e978c482a6f1644","scripts":{"test":"jest","build":"rimraf ./lib && tsc"},"typings":"lib/ts-jest-mocker.d.ts","_npmUser":{"name":"dariosn85","email":"dariosn85.dev@gmail.com"},"repository":{"url":"git+https://github.com/dariosn85/ts-jest-mocker.git","type":"git"},"_npmVersion":"8.11.0","description":"Powerful, lightweight and TypeScript friendly library that extends Jest with capability of mocking classes and interfaces.","directories":{},"_nodeVersion":"16.16.0","dependencies":{"jest":"^28.1.3","@types/jest":"^28.1.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^3.0.2","ts-jest":"^28.0.8","typescript":"^4.7.4","@types/jest":"^28.1.7"},"_npmOperationalInternal":{"tmp":"tmp/ts-jest-mocker_0.3.0_1661603507175_0.8837078770158531","host":"s3://npm-registry-packages"}},"0.4.0-alpha.1":{"name":"ts-jest-mocker","version":"0.4.0-alpha.1","keywords":["jest","typescript","mock","class","interface","unit","tests"],"author":{"name":"Dario Snajder"},"license":"ISC","_id":"ts-jest-mocker@0.4.0-alpha.1","maintainers":[{"name":"dariosn85","email":"dariosn85.dev@gmail.com"}],"homepage":"https://github.com/dariosn85/ts-jest-mocker#readme","bugs":{"url":"https://github.com/dariosn85/ts-jest-mocker/issues"},"dist":{"shasum":"ea2c57d89f7c4edcd3dfde102a8cef326b778e54","tarball":"https://registry.npmjs.org/ts-jest-mocker/-/ts-jest-mocker-0.4.0-alpha.1.tgz","fileCount":4,"integrity":"sha512-NSPQM3wkeGtti/9fxrVxErWtunbfzo87s0dr0QPETTGrW1XcqoMmsHTY9FaXkrX518gApVSyJL2mLK0vUEoJfg==","signatures":[{"sig":"MEUCIGAQsMTgOB/REFhQ1L+3htC4+pJhijIHW+9MWyTuoFKtAiEArXbCVPe45ZZbTEKLniWmlJJXV4TsmsHsztbxfzzXoOM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8439,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjC9NBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqhHg//evAKVaRqkPS/q4B0x31v2Q6XbZP0MDxpOzoJ7H9cW+atPoMd\r\nKkkm+6p5MGacV1Be1Qip0kc2mt2dhZ0ypUz4l0t7T8BVw7kfr82y/+yGvHJh\r\naLutISds5HVDhXn9hfcCxPOrvpYKGi1zajkFMr/RXEaibrlJYvMakLZ2rDlf\r\nlPtqd0iKwLBaCx5A4j4lA8eN8MNR7jGJqSfEbMjdpj8+l2Udwco18Gai3geK\r\ncD6YG6Qsqt29QUBNMj85J0tzDugWUJrAKvL4kV97DKwQQr+dU1AOSenUTXU4\r\n/KT0U7UVr6NzlQ6e1NkqUdR4U/B+wP8mXZhJKoOCGEt6qOu+UsYJMQyUELKk\r\nwlICJ2M2EaCy5ewxvrfxTlmoL+FANn5YEPL0EQBk2NgmABe32GOtZlPQLgif\r\no/AfHpusYWMQZ7DegQ4QfC7NhI+un7NztKgtNGAZWcbxXpCeOPJgSAeGaRW2\r\nfwvtC2MlqVq2/kCvfPhMg7c9S4Afp0927q8xKk4Fq460w2UEd0LDWEBIimag\r\n7hjMkRXjR2KjFr56aoMSwDUtYaeN4+l5dmv4jW2j8nmzJ7/XPKjI9+lkhmo0\r\n7nN7J0hjkx6m14dj36nybBF6MthPSXx3F0wYDt3J7UBgnRvKw7w/4juAim0C\r\n1V5vLo0pxAWH004xsM8WPajJZ5WhPa/oMtg=\r\n=P1UA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/ts-jest-mocker.js","gitHead":"ea37e2d481bd65627668c09447e8f64dbe418535","scripts":{"test":"jest","build":"rimraf ./lib && tsc"},"typings":"lib/ts-jest-mocker.d.ts","_npmUser":{"name":"dariosn85","email":"dariosn85.dev@gmail.com"},"repository":{"url":"git+https://github.com/dariosn85/ts-jest-mocker.git","type":"git"},"_npmVersion":"8.11.0","description":"Powerful, lightweight and TypeScript friendly library that extends Jest with capability of mocking classes and interfaces.","directories":{},"_nodeVersion":"16.16.0","dependencies":{"jest":"^28.1.3","@types/jest":"^28.1.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^3.0.2","ts-jest":"^28.0.8","typescript":"^4.7.4","@types/jest":"^28.1.7"},"_npmOperationalInternal":{"tmp":"tmp/ts-jest-mocker_0.4.0-alpha.1_1661719361403_0.5051473747485729","host":"s3://npm-registry-packages"}},"0.4.0-alpha.2":{"name":"ts-jest-mocker","version":"0.4.0-alpha.2","keywords":["jest","typescript","mock","class","interface","unit","tests"],"author":{"name":"Dario Snajder"},"license":"ISC","_id":"ts-jest-mocker@0.4.0-alpha.2","maintainers":[{"name":"dariosn85","email":"dariosn85.dev@gmail.com"}],"homepage":"https://github.com/dariosn85/ts-jest-mocker#readme","bugs":{"url":"https://github.com/dariosn85/ts-jest-mocker/issues"},"dist":{"shasum":"4974984fd31062c6f0f892b4eda3e6d2fbaa5ba7","tarball":"https://registry.npmjs.org/ts-jest-mocker/-/ts-jest-mocker-0.4.0-alpha.2.tgz","fileCount":18,"integrity":"sha512-GE2iV9IpKeVHtOQzgCVYKIgrbWo1oHp55IAy0L0dCjc5/BK3mtlgwpjS84b16fTq55kp70imE8k5L0WzdyuIbQ==","signatures":[{"sig":"MEUCIBCHEqWdaTBEJ4wFt4fEo6/fh3cEf/8bB/2Rb8mHK1leAiEAg+aShdwBABhWJtHa4sPdmrtE9OjX9iEagTN03J1OhW8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16020,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjER/tACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr09g/9G5YdPawLtDPMsHamJyEgKV7LfOQJeJFXYprdW68hv0yjrfr6\r\nPVeyQyzokk42YyoFL6iVlQKD7gK6BCMvzCAkIy//+O53qqmP0AZYLpaEofNv\r\n/sbDf5QH9q32OjBPYfW3jA0jRT1hFTHFCdkrhBZfikLxX+afd07eeqPL/MAh\r\ngbdJDMuUgQXeiBJM7sIHLHYRooiaebdt6FlyzBW5edocQyxNDhw7AL3kRDdX\r\n/waV3jddn3r3FGk6Zo3bgcdek3qyc2EaztL+Fz6YCxQsUaz6ROCas9ObcnJx\r\na/vcGdKasoli2on9h4ac8Yunf7cBjPIruM65TMammkzBuFGDIZnXk54tWfqx\r\n5Qu7vApr8QwPuhV7Duz+EF+shhBf2lXOpQBmR4TtmsBMes5GRX2qCjrFNzRO\r\nJYud6lwzGhbSziXQ2HFwQvwBpa1xjo266252NGKUkWUJcslCZ/wQHydoiBSz\r\ngpN2peVSDgu/wBXdC2GsIxc4qlMoY3fjdzjbt7ak7cuHc+myq3yZN30cXyCU\r\nK3mz4sJFqsgewB8QUnZ3M6yifHSummIpXUWEnBBNRLo+AHFWYciEpKQVndMR\r\nsDQfGQ0TaOay+1kEiO0YAZZCgWE70EcLoVewU1zuvevnjdC8JlhEuFahBN+y\r\nWl+n+lf3xjkI/sxQhazHJl9lqNLUx/HRu2U=\r\n=5Apg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/lib/index.js","gitHead":"1dba030e2e88f076821d69bd15d3645ba5f18ed2","scripts":{"test":"jest","build":"rimraf ./lib && tsc"},"typings":"lib/lib/index.d.ts","_npmUser":{"name":"dariosn85","email":"dariosn85.dev@gmail.com"},"repository":{"url":"git+https://github.com/dariosn85/ts-jest-mocker.git","type":"git"},"_npmVersion":"8.11.0","description":"Powerful, lightweight and TypeScript friendly library that extends Jest with capability of mocking classes and interfaces.","directories":{},"_nodeVersion":"16.16.0","dependencies":{"jest":"^28.1.3","@types/jest":"^28.1.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^3.0.2","ts-jest":"^28.0.8","typescript":"^4.7.4","@types/jest":"^28.1.7"},"_npmOperationalInternal":{"tmp":"tmp/ts-jest-mocker_0.4.0-alpha.2_1662066669271_0.9334151042035894","host":"s3://npm-registry-packages"}},"0.5.0":{"name":"ts-jest-mocker","version":"0.5.0","keywords":["jest","typescript","mock","class","interface","unit","tests"],"author":{"name":"Dario Snajder"},"license":"ISC","_id":"ts-jest-mocker@0.5.0","maintainers":[{"name":"dariosn85","email":"dariosn85.dev@gmail.com"}],"homepage":"https://github.com/dariosn85/ts-jest-mocker#readme","bugs":{"url":"https://github.com/dariosn85/ts-jest-mocker/issues"},"dist":{"shasum":"c1a598b731944504ad7916c7be84833153f58b85","tarball":"https://registry.npmjs.org/ts-jest-mocker/-/ts-jest-mocker-0.5.0.tgz","fileCount":18,"integrity":"sha512-GZmyQ6dOWtB4jvpSj9w8NsvsDX0q7nHNxqPFKNIWB68I7CEmVVzAgrlHan99DI20HsuP5ZHqhuVKmRPY19a/aA==","signatures":[{"sig":"MEYCIQDYoOqjrKg2niE2LLerhKMe8hJ0e7YOZeFd1ssiyPw0oQIhANr93nKjUuZPVI0NujtD4DRwxXuCwkNNrs7q2B9/hltX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16295,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjFxgBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpeFA//SCJ8BAJSfsDbssvdXYX0dNgUv2GTmrmNuwoF1n1OW5tZMj1Y\r\n550GpiaATXuBc4Ib3XuqWwX6C2sB8sn+MtjE7OEj5M5YZbgjoHw2L+ULVoVB\r\nyvUV1DeC6qyDhxKW5tNlzpmq6i0kQmVLO7nM1XuMJq5YCYeF0mp3EMp9HP+O\r\nAVJAFz1fJ8jaAmpz7iT08h09oNZUvm9lKunodb8aWTf0NxywM97eJ7VcPfVR\r\nG3uqJvMs27MNRagQ9h8Tdv01ItS2prd92XYDHtJpsj2fzolmkjE8ZsH6eftR\r\nHlS7NbfblTdzfOOrGuaQSCYWPWgIhXdQvhHvKyIDFudSaaZP82ygU6Y1uW1K\r\nwU+gFGws9A6h5815qrZ1udIDnzkbFfNINS9rPBpaoDFakUebSjGVdJQfdGDF\r\n5J7nZwvX78z5Vt4lQK64avr54FzzuxN2w10bf4dD8Z4qACYa4SU+j6lbyic/\r\n6sa64jq6bSIaiqNOkfODCUbu3P6Jtu3Qd0MvfAH/jOir8giTCRwgHN5eQGL+\r\nxYkRPS+2nT1iZHgiuyjaGfH6d6T47ZYP09+6FlYdeWB2pqsE9ODERR9tP73M\r\nG5eSl7dGSTZJ7EpqZENcBFigop3gEoxPN+jc36Bi9jATnZExoyc6U86MYmET\r\n83/IiBlsVz5rcWTHrxg5XChkXc78uTv23b0=\r\n=CJYG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/lib/index.js","gitHead":"a3613ddef79c141e73171cebdb173da3328ca971","scripts":{"test":"jest","build":"rimraf ./lib && tsc"},"typings":"lib/lib/index.d.ts","_npmUser":{"name":"dariosn85","email":"dariosn85.dev@gmail.com"},"repository":{"url":"git+https://github.com/dariosn85/ts-jest-mocker.git","type":"git"},"_npmVersion":"8.15.0","description":"Powerful, lightweight and TypeScript friendly library that extends Jest with capability of mocking classes and interfaces.","directories":{},"_nodeVersion":"16.17.0","dependencies":{"jest":"^28.1.3","@types/jest":"^28.1.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^3.0.2","ts-jest":"^28.0.8","typescript":"^4.7.4","@types/jest":"^28.1.7"},"_npmOperationalInternal":{"tmp":"tmp/ts-jest-mocker_0.5.0_1662457857551_0.43191551598493705","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"ts-jest-mocker","version":"1.0.0","keywords":["jest","typescript","mock","class","interface","unit","tests"],"author":{"name":"Dario Snajder"},"license":"ISC","_id":"ts-jest-mocker@1.0.0","maintainers":[{"name":"dariosn85","email":"dariosn85.dev@gmail.com"}],"homepage":"https://github.com/dariosn85/ts-jest-mocker#readme","bugs":{"url":"https://github.com/dariosn85/ts-jest-mocker/issues"},"dist":{"shasum":"faac4a0c71f39a8d737a9ef8c641db46fc6612cf","tarball":"https://registry.npmjs.org/ts-jest-mocker/-/ts-jest-mocker-1.0.0.tgz","fileCount":18,"integrity":"sha512-NC/BiEB5AR9yYAQTZNh3koyOlPy7NVhDRm39A+7Rnz7e/zHJrTR5+Mp0LyK4lmBGC8hR2KpA7l3pRn9zW1Dpjw==","signatures":[{"sig":"MEQCIAdROhmb7KU54HpIA8LrN5PiuRB2Tl3n1uOduar2TZUNAiBwb+VqHxaS6zSjQhwMvVo7arJ88gbey/6PfwyZF7Qbrg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17560},"main":"lib/lib/index.js","gitHead":"a94083a91a2e133ebbd201ad892ff40d649a1366","scripts":{"test":"jest","build":"rimraf ./lib && tsc","format":"prettier . --write","prepare":"husky install","format:check":"prettier . --check"},"typings":"lib/lib/index.d.ts","_npmUser":{"name":"dariosn85","email":"dariosn85.dev@gmail.com"},"repository":{"url":"git+https://github.com/dariosn85/ts-jest-mocker.git","type":"git"},"_npmVersion":"8.19.4","description":"Powerful, lightweight and TypeScript friendly library that extends Jest with capability of mocking classes and interfaces.","directories":{},"_nodeVersion":"16.20.2","dependencies":{"jest":"^28.1.3","@types/jest":"^28.1.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^8.0.3","rimraf":"^3.0.2","ts-jest":"^28.0.8","ts-node":"^10.9.2","prettier":"^3.2.4","typescript":"^4.7.4","@types/jest":"^28.1.7"},"_npmOperationalInternal":{"tmp":"tmp/ts-jest-mocker_1.0.0_1706039992337_0.13168921334233064","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"ts-jest-mocker","version":"1.1.0","keywords":["jest","typescript","mock","class","interface","unit","tests"],"author":{"name":"Dario Snajder"},"license":"ISC","_id":"ts-jest-mocker@1.1.0","maintainers":[{"name":"dariosn85","email":"dariosn85.dev@gmail.com"}],"homepage":"https://github.com/dariosn85/ts-jest-mocker#readme","bugs":{"url":"https://github.com/dariosn85/ts-jest-mocker/issues"},"dist":{"shasum":"1f4125a19c940c7e6ceba5f6b213933504eb7840","tarball":"https://registry.npmjs.org/ts-jest-mocker/-/ts-jest-mocker-1.1.0.tgz","fileCount":26,"integrity":"sha512-HMUwEuuAbeKkFgVisx/m48Utf2qurGAr8Vfd5Fd6zUG+XF0I9sLaG5kQPWZ8yulPHvDOR689616DlsahOoxrWg==","signatures":[{"sig":"MEUCIQCvM5Yo/bAOSir2SyT9czsst0hkzrFmx5nkAPqWQzhPngIgXThPZR7G3jnJQaIbYQV36MV5NDsDOjent0pWiuUAHI4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":36267},"main":"lib/lib/index.js","gitHead":"acdd954da7f993ac9264c3dbedbe4f20429ca1d2","scripts":{"test":"jest","build":"rimraf ./lib && tsc","format":"prettier . --write","prepare":"husky install","format:check":"prettier . --check"},"typings":"lib/lib/index.d.ts","_npmUser":{"name":"dariosn85","email":"dariosn85.dev@gmail.com"},"repository":{"url":"git+https://github.com/dariosn85/ts-jest-mocker.git","type":"git"},"_npmVersion":"8.19.4","description":"Powerful, lightweight and TypeScript friendly library that extends Jest with capability of mocking classes and interfaces.","directories":{},"_nodeVersion":"16.20.2","dependencies":{"jest":"^28.1.3","@types/jest":"^28.1.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^8.0.3","rimraf":"^3.0.2","ts-jest":"^28.0.8","ts-node":"^10.9.2","prettier":"^3.2.4","typescript":"^4.7.4","@types/jest":"^28.1.7"},"_npmOperationalInternal":{"tmp":"tmp/ts-jest-mocker_1.1.0_1732888184712_0.15528256811504138","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"ts-jest-mocker","version":"1.2.0","keywords":["jest","typescript","mock","class","interface","unit","tests"],"author":{"name":"Dario Snajder"},"license":"ISC","_id":"ts-jest-mocker@1.2.0","maintainers":[{"name":"dariosn85","email":"dariosn85.dev@gmail.com"}],"homepage":"https://github.com/dariosn85/ts-jest-mocker#readme","bugs":{"url":"https://github.com/dariosn85/ts-jest-mocker/issues"},"dist":{"shasum":"7491ecf4818ca97c6b742d57b81f2b35da99f728","tarball":"https://registry.npmjs.org/ts-jest-mocker/-/ts-jest-mocker-1.2.0.tgz","fileCount":26,"integrity":"sha512-/TMxa7H1MlC05RhswOHlScwOounML0ogMvQtoSAWSLP4362k0aTnPoX1PNjnqvZt/CNkVimD+UURWFpytfm7kQ==","signatures":[{"sig":"MEUCIQDyItENIfxhflcXDmTda27SGB/1TwrnwGhRYMcsvEsegQIgJhOnqNnH/wFk/y2D4eVooeL79FW3kIJutmtOujGXmXU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":37459},"main":"lib/lib/index.js","gitHead":"350d8d8051c1f3ca8219cf460300876b32f89490","scripts":{"test":"jest","build":"rimraf ./lib && tsc","format":"prettier . --write","prepare":"husky install","format:check":"prettier . --check"},"typings":"lib/lib/index.d.ts","_npmUser":{"name":"dariosn85","email":"dariosn85.dev@gmail.com"},"repository":{"url":"git+https://github.com/dariosn85/ts-jest-mocker.git","type":"git"},"_npmVersion":"8.19.4","description":"Powerful, lightweight and TypeScript friendly library that extends Jest with capability of mocking classes and interfaces.","directories":{},"_nodeVersion":"16.20.2","dependencies":{"jest":"^28.1.3","@types/jest":"^28.1.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^8.0.3","rimraf":"^3.0.2","ts-jest":"^28.0.8","ts-node":"^10.9.2","prettier":"^3.2.4","typescript":"^4.7.4","@types/jest":"^28.1.7"},"_npmOperationalInternal":{"tmp":"tmp/ts-jest-mocker_1.2.0_1733128966885_0.6171798783201705","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"ts-jest-mocker","version":"1.3.0","description":"Powerful, lightweight and TypeScript friendly library that extends Jest with capability of mocking classes and interfaces.","publishConfig":{"access":"public"},"main":"lib/lib/index.js","typings":"lib/lib/index.d.ts","scripts":{"prepare":"husky install","test":"jest","build":"rimraf ./lib && tsc","format:check":"prettier . --check","format":"prettier . --write"},"repository":{"type":"git","url":"git+https://github.com/dariosn85/ts-jest-mocker.git"},"keywords":["jest","typescript","mock","class","interface","unit","tests"],"author":{"name":"Dario Snajder"},"license":"ISC","bugs":{"url":"https://github.com/dariosn85/ts-jest-mocker/issues"},"homepage":"https://github.com/dariosn85/ts-jest-mocker#readme","devDependencies":{"husky":"^8.0.3","prettier":"^3.2.4","rimraf":"^3.0.2","ts-jest":"^29.2.6","ts-node":"^10.9.2","typescript":"^4.7.4"},"dependencies":{"@types/jest":"^28.1.7 || ^29.5.14","jest":"^28.1.3 || ^29.0.0"},"gitHead":"71ecf9d1eef6b5b88d522401eeefcbbbf2b34e28","_id":"ts-jest-mocker@1.3.0","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"integrity":"sha512-jTSt9JKOfMHwunaovHeEmCv0Y32z7Xih9AT0PW1aYvyUsqz/U6VJwhbcK3iNkDYm9Qp/p0+Py4+wbf55yeI8Hg==","shasum":"2c4adee895dc384376bbf3b802987e873c026ac2","tarball":"https://registry.npmjs.org/ts-jest-mocker/-/ts-jest-mocker-1.3.0.tgz","fileCount":26,"unpackedSize":37366,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIC++4KpWpS2DfXQ3fWHxrZ6vULIoH+qMx9zah+F3HSGXAiEAsGlOss6HwnmFFc9k+ajoR1D8sDBJWEzQkmYWdvAcb0I="}]},"_npmUser":{"name":"dariosn85","email":"dario.snajder@gmail.com"},"directories":{},"maintainers":[{"name":"dariosn85","email":"dario.snajder@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ts-jest-mocker_1.3.0_1741361545398_0.27625991218503176"},"_hasShrinkwrap":false}},"time":{"created":"2022-08-27T12:31:47.109Z","modified":"2025-03-07T15:32:25.787Z","0.3.0":"2022-08-27T12:31:47.385Z","0.4.0":"2022-08-28T12:08:18.832Z","0.4.0-alpha.1":"2022-08-28T20:42:41.565Z","0.4.0-alpha.2":"2022-09-01T21:11:09.434Z","0.5.0":"2022-09-06T09:50:57.718Z","1.0.0":"2024-01-23T19:59:52.526Z","1.1.0":"2024-11-29T13:49:44.913Z","1.2.0":"2024-12-02T08:42:47.071Z","1.3.0":"2025-03-07T15:32:25.620Z"},"bugs":{"url":"https://github.com/dariosn85/ts-jest-mocker/issues"},"author":{"name":"Dario Snajder"},"license":"ISC","homepage":"https://github.com/dariosn85/ts-jest-mocker#readme","keywords":["jest","typescript","mock","class","interface","unit","tests"],"repository":{"type":"git","url":"git+https://github.com/dariosn85/ts-jest-mocker.git"},"description":"Powerful, lightweight and TypeScript friendly library that extends Jest with capability of mocking classes and interfaces.","maintainers":[{"name":"dariosn85","email":"dario.snajder@gmail.com"}],"readme":"<h1>ts-jest-mocker</h1>\n\nPowerful, lightweight, TypeScript-friendly and 100% [Jest](https://github.com/facebook/jest#readme) API compatible library\nwhich simplifies classes and interfaces mocking.\n\n[![npm version](https://badge.fury.io/js/ts-jest-mocker.svg)](https://badge.fury.io/js/ts-jest-mocker)\n[![Build](https://github.com/dariosn85/ts-jest-mocker/actions/workflows/build.yml/badge.svg)](https://github.com/dariosn85/ts-jest-mocker/actions/workflows/build.yml)\n[![Tests](https://github.com/dariosn85/ts-jest-mocker/actions/workflows/test.yml/badge.svg)](https://github.com/dariosn85/ts-jest-mocker/actions/workflows/test.yml)\n[![Publish](https://github.com/dariosn85/ts-jest-mocker/actions/workflows/npm-publish.yml/badge.svg)](https://github.com/dariosn85/ts-jest-mocker/actions/workflows/npm-publish.yml)\n\n---\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n    - [Mocking classes](#mocking-classes)\n    - [Mocking interfaces](#mocking-interfaces)\n- [More advanced example](#more-advanced-example)\n- [Configuring ts-jest-mocker](#configuring-ts-jest-mocker)\n- [Jest API compatibility](#jest-api-compatibility)\n- [Why to use ts-jest-mocker](#why-to-use-ts-jest-mocker)\n- [Notes](#notes)\n    - [ts-jest-mocker with RxJS](#ts-jest-mocker-with-rxjs)\n\n---\n\n## Getting started\n\nInstall ts-jest-mocker using [`npm`](https://www.npmjs.com/package/ts-jest-mocker):\n\n```bash\nnpm install --save-dev ts-jest-mocker\n```\n\n### Mocking classes\n\n```typescript\nimport { mock } from 'ts-jest-mocker';\n\nconst serviceMock = mock(YourService); // automatically mocks all methods\n\nserviceMock.yourMethod.mockReturnValue('Test');\n```\n\n### Mocking interfaces\n\n```typescript\nimport { mock } from 'ts-jest-mocker';\n\nconst interfaceMock = mock<YourInterface>(); // automatically mocks all interface methods\n\ninterfaceMock.yourMethod.mockReturnValue('Test');\n```\n\n### Using `Mock` type\n\n```typescript\nimport { Mock, mock } from 'ts-jest-mocker';\n\nlet serviceMock: Mock<YourService>;\n\nserviceMock = mock(YourService);\n\nserviceMock.yourMethod.mockReturnValue('Test');\n```\n\n## More advanced example\n\nAs an example let's create service `UserService` used for managing your application users.\nThis service has dependency to `UsersRepository` which is used to load users from your database.\n\n`users-repository.ts` file:\n\n```typescript title=\"users-repository.ts\"\nexport interface User {\n    name: string;\n    age: number;\n}\n\nexport class UsersRepository {\n    getUsers(): Array<User> {\n        return [\n            {\n                name: 'User1',\n                age: 30,\n            },\n            {\n                name: 'User2',\n                age: 40,\n            },\n        ];\n    }\n}\n```\n\n`users-service.ts` file:\n\n```typescript title=\"users-service.ts\"\nimport { User, UsersRepository } from './users-repository';\n\nexport class UsersService {\n    constructor(private readonly usersRepository: UsersRepository) {}\n\n    getUsers(): Array<User> {\n        return this.usersRepository.getUsers();\n    }\n}\n```\n\nNow let's create file `users-service.test.ts` and write some unit tests using ts-jest-mocker.\nWe will mock `UsersRepository` using `mock()` function. All repository methods will be mocked\nautomatically using `jest.fn()` internally and all type-checking will work out-of-the-box.\n\n`users-service.test.ts` file:\n\n```typescript title=\"users-service.test.ts\"\nimport { mock } from 'ts-jest-mocker';\nimport { UsersRepository } from './users-repository';\nimport { UsersService } from './users-service';\n\ndescribe('UsersService', () => {\n    it('should return all users', () => {\n        // GIVEN\n        const repositoryMock = mock(UsersRepository);\n        repositoryMock.getUsers.mockReturnValue([\n            {\n                name: 'Mocked user 1',\n                age: 40,\n            },\n        ]);\n        const service = new UsersService(repositoryMock);\n\n        // WHEN\n        const users = service.getUsers();\n\n        // THEN\n        expect(users).toBeDefined();\n        expect(users.length).toBe(1);\n        expect(users[0]).toEqual({\n            name: 'Mocked user 1',\n            age: 40,\n        });\n    });\n});\n```\n\n## Configuring ts-jest-mocker\n\nIn order to be more flexible and allow covering more complex testing scenarios, `ts-jest-mocker` now allows specifying\nmocking configuration. Configuration can be global, to cover all test cases (mocks) at once, or local, to cover and change\nbehavior only in case of specific tests cases (mocks);\n\n#### Local configuration\n\n```typescript\nmock(MyClass, {\n    // config values\n});\n```\n\n#### Global config\n\nIn order for configuration to be properly passed to test environments, you can define `ts-jest-mocker.setup.ts` configuration file\nand specify it in [setupFiles array](https://jestjs.io/docs/configuration#setupfiles-array) in\n[Jest configuration](https://jestjs.io/docs/configuration).\n\n##### ts-jest-mocker.setup.ts\n\n```typescript\nimport { TsJestMocker } from 'ts-jest-mocker';\n\nTsJestMocker.setConfig({\n    failIfMockNotProvided: false,\n});\n```\n\n##### jest.config.ts\n\n```typescript\nimport type { Config } from 'jest';\n\nconst config: Config = {\n    verbose: true,\n    setupFiles: ['./ts-jest-mocker.setup.ts'],\n};\n\nexport default config;\n```\n\n### Configuration options\n\n#### excludeMethodNames\n\n**Default value (classes)**: [] (empty array - no excluding)\n**Default value (interfaces)**: ['then', Symbol.iterator] (then method - to cover \"thenable\" in promises)\n\n**Description**: Methods specified on the exclusion list will be automatically excluded from mocking.\n\nExamples:\n\n```typescript\n// mock with local config\nconst mock = mock(MyClass, {\n    excludeMethodNames: ['schedule', 'then'],\n});\n```\n\n```typescript\n// global config\nTsJestMocker.setConfig({\n    excludeMethodNames: ['schedule', 'then'],\n});\n```\n\n#### includeMethodNames\n\n**Default value (classes)**: [] (empty array - no additional including)\n**Default value (interfaces)**: [] (empty array - no additional including)\n\n**Description**: Methods specified on the inclusion list will be included and covered with mocking, even if the same method exists\non the exclusion list (by default or added by user).\n\nExamples:\n\n```typescript\n// mock with local config\nconst mock = mock({\n    includeMethodNames: ['then'], // \"then\" will be mocked even if it's by default (for interfaces) excluded\n});\n```\n\n```typescript\n// global config\nTsJestMocker.setConfig({\n    includeMethodNames: ['then'],\n});\n```\n\n#### failIfMockNotProvided\n\n**Default value (classes)**: `true`\n**Default value (interfaces)**: `true`\n\n**Description**: By default, calling method on mock will throw an error if return value was not specified by user. This behavior\ncan now be changed by setting `failIfMockNotProvided` to `false`.\n\nExamples:\n\n```typescript\n// mock with local config\nconst mock = mock({\n    failIfMockNotProvided: false,\n});\n```\n\n```typescript\n// global config\nTsJestMocker.setConfig({\n    failIfMockNotProvided: false,\n});\n```\n\n## Jest API compatibility\n\nts-jest-mocker is not an alternative to Jest and does not provide an alternative API. It is utility\nwhich main purpose is to add additional capability on top of Jest to simplify writing mocks and\nkeep all the benefits of data types.\n\nWhile using ts-jest-mocker you don't need to use any custom calls to reset mock or anything.\nYou call for example `jest.resetAllMocks()` as you usually do.\n\n## Why to use ts-jest-mocker?\n\nDo you often catch yourself writing mocks manually using `jest.fn()`? Do you maybe omit defining\n`jest.Mock` type generics and implicitly end up using `any`, or what's worse, you need to explicitly\nconvert your mocks to `any` to be able to use them with classes under test? It is hard to do refactoring\nand keeping unit tests up-to-date?\n\nThe above :point_up_2: sounds familiar to you? Stop doing that! ts-jest-mocker will help you do that!\n\n#### ❌ Don'ts\n\n```typescript\nconst mockUserRepository = {\n    yourMethod1: jest.fn(),\n    yourMethod2: jest.fn(),\n    yourMethod3: jest.fn(),\n    yourMethod4: jest.fn(),\n    yourMethod5: jest.fn(),\n    yourMethod6: jest.fn(),\n\n    // ...\n\n    // ❌️ you have to mock all the methods\n    // so mock and UsersRepository are compatible?\n    yourMethod20: jest.fn(),\n};\n\nconst userService = new UserService(mockUserRepository);\n```\n\n```typescript\nconst mockUserRepository = {\n    yourMethod1: jest.fn(),\n    yourMethod2: jest.fn(),\n} as any;\n// ❌ you mock only what you need and then cast explicitly to any\n// and loose benefits from compilation phase?\n\nconst userService = new UserService(mockUserRepository);\n```\n\n```typescript\nconst mockUserRepository = {\n    yourMethod1: jest.fn(),\n};\n\n// ❌️ You often skip specifying mock types like jest.fn<User, [User]>() and\n// then need to check over and over again in the code what actually\n// mocked methods should return?\nmockUserRepository.yourMethod1.mockReturnedValue({\n    name: 'User1',\n    age: 20,\n});\n\nconst userService = new UserService(mockUserRepository as any);\n```\n\n#### ✅ Do's\n\n```typescript\n// ✅ simply use mock() function and ts-jest-mocker will\n// provide mocks for all the methods for you\nconst mockUserRepository = mock(UsersRepository);\n\nmockUserRepository.yourMethod1.mockReturnedValue({\n    name: 'User1',\n    age: 20,\n}); // ✅ return type is automatically checked while compilation\n\nmockUserRepository.yourMethod1.mockReturnedValue({\n    name: 'User1',\n}); // ❗ [compilation error] - you will catch incorrect types\n\nmockUserRepository.yourMethod1.mockReturnedValue({\n    age: 20,\n}); // ❗ [compilation error] - you will catch incorrect types\n\n// ❗ [compilation error] - you will catch incorrect types\nmockUserRepository.yourMethod1.mockReturnedValue(true);\n\nconst userService = new UserService(mockUserRepository);\n```\n\n## Notes\n\n### ts-jest-mocker with RxJS\n\nWhen using `ts-jest-mocker` + [RxJS](https://rxjs.dev/) for mocking interfaces, there could be issues like\n`Method schedule is not mocked` as reported under [this issue](https://github.com/dariosn85/ts-jest-mocker/issues/6).\n\nIssue appears when you pass mock to an [of()](https://rxjs.dev/api/index/function/of) operator, as under the hood\noperator internally checks if, so called, [Scheduler](https://rxjs.dev/guide/scheduler) was passed as a parameter.\n\nExample:\n\n```typescript\nimport { firstValueFrom, of } from 'rxjs';\n\nconst testMock = mock<YourInterface>();\n\nconst observable = of(testMock);\n\nconst value = await firstValueFrom(observable);\n```\n\nThe above code will throw `Method 'schedule' is not mocked` error.\n\nThis can be simply solved by excluding `schedule` methods from mocking.\n\nExample:\n\n```typescript\nimport { firstValueFrom, of } from 'rxjs';\n\nconst testMock = mock<YourInterface>({\n    excludeMethodNames: ['schedule'],\n});\n\nconst observable = of(testMock);\n\nconst value = await firstValueFrom(observable);\n```\n","readmeFilename":"README.md"}