{"_id":"@anaslaham/meteor-jest-stubs","_rev":"2-468bbbbcce9b4752299a895fdeb86eaa","name":"@anaslaham/meteor-jest-stubs","dist-tags":{"latest":"2.5.0"},"versions":{"2.3.0":{"name":"@anaslaham/meteor-jest-stubs","version":"2.3.0","description":"Stubs for using Jest to unit test Meteor modules","main":"lib/meteor/meteor.js","scripts":{"test":"jasmine"},"repository":{"type":"git","url":"git+https://github.com/anaslaham/meteor-jest-stubs.git"},"keywords":["jest","meteor","stubs"],"author":{"name":"Daniel Maslowski"},"license":"MIT","bugs":{"url":"https://github.com/anaslaham/meteor-jest-stubs.git"},"homepage":"https://github.com/anaslaham/meteor-jest-stubs.git","peerDependencies":{"jest-cli":"^27.3.1"},"gitHead":"24e0971a023d178be6f16942f5c181d2c233059b","_id":"@anaslaham/meteor-jest-stubs@2.3.0","_nodeVersion":"14.21.3","_npmVersion":"6.14.18","dist":{"integrity":"sha512-8eGM+t/2PSNPLjAqklLmIcWCFbz7Ic7atJ84OW+sVcWuUSWGIl5ZHdQyU8LtTA/jGqgMiqBWvIabyj4B2K2HRQ==","shasum":"c5ac837e8a713c28a7483b5970008c0d51536a8d","tarball":"https://registry.npmjs.org/@anaslaham/meteor-jest-stubs/-/meteor-jest-stubs-2.3.0.tgz","fileCount":26,"unpackedSize":9963,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICRtF3A/PbEMho5OmDVJXWd03YVT85ulF8GTm/h819TpAiBR+4mw3CCTHWZtkhNQIFVFUDNyZQ2g8BiIuMePtYQOhw=="}]},"_npmUser":{"name":"anaslaham","email":"anoslaham@gmail.com"},"directories":{},"maintainers":[{"name":"anaslaham","email":"anoslaham@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/meteor-jest-stubs_2.3.0_1690888658508_0.671214341281986"},"_hasShrinkwrap":false},"2.4.0":{"name":"@anaslaham/meteor-jest-stubs","version":"2.4.0","description":"Stubs for using Jest to unit test Meteor modules","main":"lib/meteor/meteor.js","scripts":{"test":"jasmine"},"repository":{"type":"git","url":"git+https://github.com/anaslaham/meteor-jest-stubs.git"},"keywords":["jest","meteor","stubs"],"author":{"name":"Daniel Maslowski"},"license":"MIT","bugs":{"url":"https://github.com/anaslaham/meteor-jest-stubs.git"},"homepage":"https://github.com/anaslaham/meteor-jest-stubs.git","peerDependencies":{"jest-cli":"^27.3.1"},"gitHead":"6d2589e32ccc733dec897d1b12de745905f5cc9f","_id":"@anaslaham/meteor-jest-stubs@2.4.0","_nodeVersion":"14.21.3","_npmVersion":"6.14.18","dist":{"integrity":"sha512-XvTnGIhvLZI5ke1K/yTeEgvJhwyNFENzdMiaIumjg9P2ASxTu1bNDAg7JdiBu6bLedd0PBIwp51ietIEa4xjQw==","shasum":"68c7f785c4580f5ac16101199dcfcf6d45809593","tarball":"https://registry.npmjs.org/@anaslaham/meteor-jest-stubs/-/meteor-jest-stubs-2.4.0.tgz","fileCount":26,"unpackedSize":10105,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBonRZOatnwva0RIolEmwt9qxi6QEB9zFkiN0ynXgxPKAiEAwIg4G4+a8nZ4VPIWmYb5FZbrXjq+/FQ+01wpEbRZqhE="}]},"_npmUser":{"name":"anaslaham","email":"anoslaham@gmail.com"},"directories":{},"maintainers":[{"name":"anaslaham","email":"anoslaham@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/meteor-jest-stubs_2.4.0_1690890600572_0.19326791651707786"},"_hasShrinkwrap":false},"2.5.0":{"name":"@anaslaham/meteor-jest-stubs","version":"2.5.0","description":"Stubs for using Jest to unit test Meteor modules","main":"lib/meteor/meteor.js","scripts":{"test":"jasmine"},"repository":{"type":"git","url":"git+https://github.com/anaslaham/meteor-jest-stubs.git"},"keywords":["jest","meteor","stubs"],"author":{"name":"Daniel Maslowski"},"license":"MIT","bugs":{"url":"https://github.com/anaslaham/meteor-jest-stubs.git"},"homepage":"https://github.com/anaslaham/meteor-jest-stubs.git","peerDependencies":{"jest-cli":"^27.3.1"},"gitHead":"757aa15f4a9f7b2a43bd8f8367965fd34a32dcf9","_id":"@anaslaham/meteor-jest-stubs@2.5.0","_nodeVersion":"14.21.3","_npmVersion":"6.14.18","dist":{"integrity":"sha512-Ion/iLWju17siQ0qO7i6+hEd3foFzkHk63qdmvJfXKuCy5PNnJ0MUA/rtaQpeXSgWW22eD9QGcMXahWAhAUHKg==","shasum":"b477f335020e2ec77279f2e0713807274426f398","tarball":"https://registry.npmjs.org/@anaslaham/meteor-jest-stubs/-/meteor-jest-stubs-2.5.0.tgz","fileCount":26,"unpackedSize":10100,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfKy1X6qKVRsW1dO83U6YH2P0ToY7ifXHNC8azdduI4AIgFKmD50OOqMDfzocjzzaY5OXqgqpEP8MQbuG0qIzitcA="}]},"_npmUser":{"name":"anaslaham","email":"anoslaham@gmail.com"},"directories":{},"maintainers":[{"name":"anaslaham","email":"anoslaham@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/meteor-jest-stubs_2.5.0_1690895756507_0.28597950975571695"},"_hasShrinkwrap":false}},"time":{"created":"2023-08-01T11:17:38.397Z","2.3.0":"2023-08-01T11:17:38.649Z","modified":"2023-08-01T13:15:56.780Z","2.4.0":"2023-08-01T11:50:00.712Z","2.5.0":"2023-08-01T13:15:56.664Z"},"maintainers":[{"name":"anaslaham","email":"anoslaham@gmail.com"}],"description":"Stubs for using Jest to unit test Meteor modules","homepage":"https://github.com/anaslaham/meteor-jest-stubs.git","keywords":["jest","meteor","stubs"],"repository":{"type":"git","url":"git+https://github.com/anaslaham/meteor-jest-stubs.git"},"author":{"name":"Daniel Maslowski"},"bugs":{"url":"https://github.com/anaslaham/meteor-jest-stubs.git"},"license":"MIT","readme":"# meteor-jest-stubs\nThis is a supported fork of [orangecms/jest-meteor-stubs](https://github.com/orangecms/jest-meteor-stubs). Please note that, the package name is slightly different than the original one:\n\n```diff\n- jest-meteor-stubs\n+ meteor-jest-stubs\n```\n\n## About\nTesting Meteor code is very slow when using the built-in `meteor test` command.\nThese stubs will help you get rid of the dependencies which are not present in\nyour project's `node_modules` directory. Use the setup below which does most of\nthe actual magic. :)\n\n## Installation\n`npm i -D meteor-jest-stubs` or `yarn add -D meteor-jest-stubs`\n\n## How it works\nJest preprocesses the files to be executed through the test runner. When pulling\nin dependencies, i.e. using `require` (in ES6 `import`), similar to the default\nbehavior of Node.js, the resolver will look for them in a local directory named\n`node_modules`. However, Meteor injects additional modules when running `meteor`\ninstead of plain Node.js, which do not reside in this directory. Jest allows you\nto overcome this issue by providing additional locations where the load should\nlook for modules.\n\n## Usage\nAdd this module's `lib/` directory to the `modulePaths` in your Jest config.\nFor Meteor packages, you will need to use `moduleNameMapper` to rewrite the\nmodule names to use `_` instead of `:` for the namespaces as `:` is not allowed\nby some file/operating systems.\nThe configuration has to be in `jest.config.js` in Jest 20 because of\n[a bug in the mapper](https://github.com/facebook/jest/issues/3716).\n\nHere is a working example:\n\n```javascript\nmodule.exports = {\n  transform: {\n    '^.+\\\\.jsx?$': 'babel-jest',\n  },\n  moduleFileExtensions: [\n    'js',\n    'jsx',\n  ],\n  modulePaths: [\n    '<rootDir>/node_modules/',\n    '<rootDir>/node_modules/meteor-jest-stubs/lib/',\n  ],\n  moduleNameMapper: {\n    '^(.*):(.*)$': '$1_$2',\n  },\n  transformIgnorePatterns: [\n    \"<rootDir>/node_modules/meteor-jest-stubs\",\n  ],\n  unmockedModulePathPatterns: [\n    '/^imports\\\\/.*\\\\.jsx?$/',\n    '/^node_modules/',\n  ],\n};\n```\n","readmeFilename":"README.md"}