{"library":"fake","type":"library","category":null,"description":"This package, `fake` (version 0.2.2), is an early JavaScript utility designed for creating test doubles, specifically 'faking' dependencies to isolate units under test. Released for very old Node.js environments (requiring Node.js >=0.4.0), it predates most modern testing frameworks and mocking libraries. The project appears to be abandoned, with its last release dating back to a period when Node.js was in its infancy. It provides basic mechanisms for stubbing or mocking parts of an application's dependencies, allowing developers to focus on the logic of a single component without external side effects. Given its age and lack of updates, it is not suitable for contemporary JavaScript development and lacks features prevalent in current mocking solutions like Jest or Sinon.js. Its release cadence is effectively nonexistent due to its abandonment.","language":"javascript","status":"abandoned","version":"0.2.2","tags":["javascript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install fake","imports":["const Fake = require('fake');","const Fake = require('fake');\nconst target = { method: () => 'original' };\nconst f = new Fake(target, 'method', () => 'faked');\nf.run(); // Applies the fake method to target.method\n// ... test execution ...","const Fake = require('fake');\nconst target = { method: () => 'original' };\nconst f = new Fake(target, 'method', () => 'faked');\nf.run();\n// ... test execution ...\nf.restore(); // Reverts target.method to its original state"]},{"cmd":"yarn add fake","imports":[]},{"cmd":"pnpm add fake","imports":[]}],"homepage":null,"github":"https://github.com/felixge/node-fake","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/fake","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/fake/compatibility"}}