{"_id":"opentelemetry-instrumentation-testing-utils","_rev":"32-cb5270568c5d93e0bb3a1e57213059fa","name":"opentelemetry-instrumentation-testing-utils","dist-tags":{"alpha":"0.0.0-2021-12-26--12-31","latest":"0.27.0"},"versions":{"0.0.0-2021-05-31--14-38":{"name":"opentelemetry-instrumentation-testing-utils","version":"0.0.0-2021-05-31--14-38","description":"utils for testing opentelemetry js instrumentation libraries","keywords":["opentelemetry","testing","instrumentation"],"homepage":"https://github.com/aspecto-io/opentelemetry-ext-js#readme","license":"Apache-2.0","main":"dist/src/index.js","repository":{"type":"git","url":"git+https://github.com/aspecto-io/opentelemetry-ext-js.git"},"scripts":{"build":"tsc","prepare":"yarn run build","watch":"tsc -w"},"bugs":{"url":"https://github.com/aspecto-io/opentelemetry-ext-js/issues"},"dependencies":{"@opentelemetry/api":"^1.0.0-rc.0","@opentelemetry/tracing":"^0.19.0"},"gitHead":"bd5bce12191c8173f30d62733cb45d2dc0feb610","_id":"opentelemetry-instrumentation-testing-utils@0.0.0-2021-05-31--14-38","_nodeVersion":"12.22.1","_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","dist":{"integrity":"sha512-tawf4CF/1+NlLxK3DluSCzgtueVUde2NGFuemBq2CFXd7hTAM5BV+JvV0WZZd+q6PElmp2G6pcOQal/t0xfKkw==","shasum":"f9bf93e5803f70faa438ed3c555058c68e12d198","tarball":"https://registry.npmjs.org/opentelemetry-instrumentation-testing-utils/-/opentelemetry-instrumentation-testing-utils-0.0.0-2021-05-31--14-38.tgz","fileCount":9,"unpackedSize":16653,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtPU6CRA9TVsSAnZWagAAcZoQAI1v2m44Sf3mjA5B13Bn\nS8S1aB11lNgl7KmBPdsR5TJilAzozaIg1dHw8/c/kqJsDGeK1QWVO8lL0GUX\nWuqcs1ZPQkN7EDKammHLAgeGOAoNmMUVRFH1oZb6+HA92+brEs97780t5J0Q\n+GTHriU2jq5LwGQUwWJ/phMXntMqo7Z0tQdQ6UteDR/jizY5N5taJu+nJfkX\nAR2UtvivB7Af/g+YtWdr0jHWj+y0LqHf5xfGLfg7+sucqm/NV/F8Om9vbcu1\nP0oWBkx7opoI43GF5EZkc8EKCxBzBTMZGuyER0ixc5S8XlA3TTpMHUVAL8Jm\nAz9SycrRgWEUPU9QMxF9h1uhFM4D5Flhokl94EcA2XXhnNLH0awFi86aM28f\nQBTfqL22rrK01NwSGdjYTkhydlUn3SssAiJxLt0eYSmEDZ0HaYdf1i9HHwdx\nbN+aA9oKDcQ7HCobJVND3AR0VsQ9t1UIrHbote4at/eRK7P0S7o7GF7Tl7mj\n0xeJiiS/GxvOzQa/752/CwmwpU34GCDpPA0V/B6kEW8/vK2iDS1A2ht72UnX\nEToFptsjfLsX3QPLePEndu1dQk6O5HHrN+e4NI9ykvPrYsqoSPraE0+yElzZ\nc1sWo/8X+TIpiFxF+OWdiNmwzX1sA46J1A92IFLZAoR14p+dDKgM5IMqBSqi\nsCBE\r\n=0deK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAMlODgRSFFS7q0oCmh/FXz2oU3orUK5fWpI9a7EEiF9AiEA5ma1yo9BLGcxjKBkwHKQYS6xczhKxRfR1jLmvYKp1QU="}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"aspecto-release-bot","email":"dev@aspecto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-instrumentation-testing-utils_0.0.0-2021-05-31--14-38_1622471994011_0.5287294010519203"},"_hasShrinkwrap":false},"0.4.1":{"name":"opentelemetry-instrumentation-testing-utils","version":"0.4.1","description":"utils for testing opentelemetry js instrumentation libraries","keywords":["opentelemetry","testing","instrumentation"],"homepage":"https://github.com/aspecto-io/opentelemetry-ext-js#readme","license":"Apache-2.0","main":"dist/src/index.js","repository":{"type":"git","url":"git+https://github.com/aspecto-io/opentelemetry-ext-js.git"},"scripts":{"build":"tsc","prepare":"yarn run build","watch":"tsc -w"},"bugs":{"url":"https://github.com/aspecto-io/opentelemetry-ext-js/issues"},"dependencies":{"@opentelemetry/api":"^1.0.0-rc.0","@opentelemetry/exporter-jaeger":"^0.19.0","@opentelemetry/node":"^0.19.0","@opentelemetry/tracing":"^0.19.0"},"gitHead":"909b2e07091c7a7e88e29438f936bb30b6416c1f","_id":"opentelemetry-instrumentation-testing-utils@0.4.1","_nodeVersion":"12.22.1","_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","dist":{"integrity":"sha512-kVDHUpG6hIeGg0Bcg8YkIQtGpPtZ216/ALobO3EnwIGptLkDcbVmTYR8q4C2die3k+cIhISjHjyg4Kd3/Qi98g==","shasum":"ed8f4cfc4fd3a440b7c4a0d95106574431b014ae","tarball":"https://registry.npmjs.org/opentelemetry-instrumentation-testing-utils/-/opentelemetry-instrumentation-testing-utils-0.4.1.tgz","fileCount":10,"unpackedSize":19039,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgt25qCRA9TVsSAnZWagAAsOYQAIb+N+IRci+hQQFGjvYH\nt0PB+lCvcizyL8JHZDbhdyb+v1v1kFdfsy5zhM9/fQtikWhEk7B8eaypCDbm\nyJzeDqSRLpnxo7Gd3YX8p1IWrDKZpZPHLi31HIAmRdJltGaKB6kR+F5kDnGk\n+/Pl8HFk7GG7FhmQF0K3zh9bPYlIXbod5Vwy4AIXPjIFrPe3FWBOH4PvLUPR\n75IRSQNLjz/71ibFpsGD5nY3KSZV8buXGDLqYQ76xxQV5dlz6zsisoq7v0yP\nkf7SWFYsw8YFQvWHPgoXZSoKL9EtqtWDaxsMurJWMrYuLs0lJWLTvN+LmlqN\n5rR0bXsGnVgdwF0CqJVl+KjP50LZE2n7/0jY87TificCy9BCNDbIPLuNm/TS\nVFy5y2WqZX4lKMUGNO6aCSiauy6XSS+mgNz6CKbFEq3u06ORlxspUJagEkhb\n/zZF1PuLWg/TlIySsN+93L7+lRABm43aJ+RJJ9A3SsaF7evmeJmaDpe9/V9t\n6bLxCLzyZqXTC0P7lkfCHZnlPxCl+y9LnqrPX6YkSZ6M/MFtg9au3NonEMdu\nMQk5o7E5CoairyZhDrouAzUwmLcelpY3IKCl3IrduTDrEhhnoC9UfgX6+lm/\n0EovjiedD4jkHNob9Os0JAGBE9e4fYredQjT7gto/TjnIu4vmKAdQXRsnaKa\nOzIv\r\n=2lFa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG+qOuM/DVpp9OVr7jc7vg5/Is/t4E4spgc4B9m2tBaHAiBtWwMdqV5UK8AGk5V+3oYwitwrDmuZG9yPcspKDyhzaQ=="}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"aspecto-release-bot","email":"dev@aspecto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-instrumentation-testing-utils_0.4.1_1622634090248_0.3175126286870229"},"_hasShrinkwrap":false},"0.0.0-2021-06-07--07-42":{"name":"opentelemetry-instrumentation-testing-utils","version":"0.0.0-2021-06-07--07-42","description":"utils for testing opentelemetry js instrumentation libraries","keywords":["opentelemetry","testing","instrumentation"],"homepage":"https://github.com/aspecto-io/opentelemetry-ext-js#readme","license":"Apache-2.0","main":"dist/src/index.js","repository":{"type":"git","url":"git+https://github.com/aspecto-io/opentelemetry-ext-js.git"},"scripts":{"build":"tsc","prepare":"yarn run build","watch":"tsc -w"},"bugs":{"url":"https://github.com/aspecto-io/opentelemetry-ext-js/issues"},"dependencies":{"@opentelemetry/api":"^0.20.0","@opentelemetry/exporter-jaeger":"^0.20.0","@opentelemetry/node":"^0.20.0","@opentelemetry/tracing":"^0.20.0"},"gitHead":"bb0e4af3e4a101755c22fdb692be07a6ddeef51d","readme":"# `instrumentation-testing-utils`\nUtils for testing open-telemetry instrumentation libraries\n\nThis package exports a mocah [root hook plugin](https://mochajs.org/#root-hook-plugins) and [global fixture](https://mochajs.org/#global-fixtures), which is taken care of common tasks that developer need to handle while writing unittests for instrumentations in node.\n\nThis package:\n- Initializes and registering a global trace provider for tests.\n- Registering a global memory exporter which can be referenced in test to access span.\n- Reseting the memory exporter before each test.\n- Optionally - export the test traces to Jaeger for convenience while debugging and developing.\n\nBy using this package, testing instrumentation code can be shorter, and bad practices are more easily avoided.\n\n## Supporter Version\nSince [root hook plugin](https://mochajs.org/#root-hook-plugins) are used, this package is compatible to mocha v8.0.0 and above. \n\n## Usage\n1. Add dev dependency on this package: `yarn add --dev opentelemetry-instrumentation-testing-utils`.\n2. `require` this package in mocha execution:\n\nAs command line argument option to mocha:\n```js\n    \"scripts\": {\n        \"test\": \"mocha --require opentelemetry-instrumentation-testing-utils\",\n        \"test:jaeger\": \"OTEL_EXPORTER_JAEGER_AGENT_HOST=localhost mocha --require opentelemetry-instrumentation-testing-utils\",\n    },\n``\n\nOr by using config file / package.json config:\n```js\n    \"mocha\": {\n        \"require\": [ \"opentelemetry-instrumentation-mocha\" ]\n    }\n```\n\n3. In your `.spec` file, import `getTestSpans` function and use it to make assertions in the test:\n```js\nimport { getTestSpans } from 'opentelemetry-instrumentation-testing-utils';\n\nit('some test', () => {\n    // your code that generate spans for this test\n    const spans: ReadableSpan[] = getTestSpans();\n    // your code doing assertions with the spans array\n});\n```\n\nThat's it - supper short and easy.","readmeFilename":"README.md","_id":"opentelemetry-instrumentation-testing-utils@0.0.0-2021-06-07--07-42","_nodeVersion":"12.22.1","_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","dist":{"integrity":"sha512-auatt7OOfu9s2THyT1WRgNVgB3qOClEBUFtBc94qhA8+wt5JpTYfvKsPc7TMDpz8y1oiAudGiLZ1rehP/Tpd0g==","shasum":"a2f8ea6be547973b58b8f025d5e494eca24ea500","tarball":"https://registry.npmjs.org/opentelemetry-instrumentation-testing-utils/-/opentelemetry-instrumentation-testing-utils-0.0.0-2021-06-07--07-42.tgz","fileCount":10,"unpackedSize":19038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvc4xCRA9TVsSAnZWagAA8/gQAI+kePjOhqvXkCCqVANi\nF622r3CZcN1ujHJcwnJq7gz4DkbhNC/vMu7X4JD2JgElZg+uKUTH+w+LJ1uu\n7s4ASU6FQOuAw/l4FO0PrtenYlAM1jbRuQVilJsZ587RhtjatMbmQSDevPs1\nw17uLBPNsjm/0iD4UM8zITN3Qa//Cb+LLW0kToTiUsYSetcKa5JBEALz+Hzh\nJd/IsiWkqC9dzLiUuCzkGyi/WdKGLstRjPYk1zHDcOnQ/Oz5nT8O67gkWc+K\ng3oN5aOyXETiB7j8qQtgcbZQ3PmQdVnk3tsgfDNVgkKbrpUbEVwJKOWVn71o\nkZ2fcPWkoV3r7tPZfXfFZNkGMBdV5LeynAPUmUtW2HUaTmT0cpACNXfFcAPY\nqj4nIgs5ZchzfHspn3CF6J6z6kYSyJZdBQUqblqFf2KaoVlSKx7VV9TcmD/D\nRISoRVtHg/gqXLEYCtvUCXFxOHrAQSxI5yXdGwjYvFna9n17AkSwGT9T72ZZ\nLtc/cJfDGkSaBM72VItTV56wfKVXlPnq0TlZwc/Cr5oS/O0XYmRa/LAtGknD\nfXfxdUXejgDGokrMa8+qTbzcZypKPy6jaWa8ZFg0pXVuk1BK8xENkqypGm3s\n3AK/nEZQJToz+V5pDwEPAXAeKFGXVbpkldiXKDwzWX8GJcjg67Yt8A2GSQWT\nqDue\r\n=SUEx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCz2BFxXXslI0ovdAeZb41gnJMMrbzrFy2TfTKuNu+2pgIgerg4TIXiG2dig9a/vgnRRvBh49ODFlwQ5QVywSS2M2Q="}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"aspecto-release-bot","email":"dev@aspecto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-instrumentation-testing-utils_0.0.0-2021-06-07--07-42_1623051824952_0.5065428632435827"},"_hasShrinkwrap":false},"0.0.0-2021-06-09--06-50":{"name":"opentelemetry-instrumentation-testing-utils","version":"0.0.0-2021-06-09--06-50","description":"utils for testing opentelemetry js instrumentation libraries","keywords":["opentelemetry","testing","instrumentation"],"homepage":"https://github.com/aspecto-io/opentelemetry-ext-js#readme","license":"Apache-2.0","main":"dist/src/index.js","repository":{"type":"git","url":"git+https://github.com/aspecto-io/opentelemetry-ext-js.git"},"scripts":{"build":"tsc","prepare":"yarn run build","watch":"tsc -w"},"bugs":{"url":"https://github.com/aspecto-io/opentelemetry-ext-js/issues"},"dependencies":{"@opentelemetry/api":"^0.20.0","@opentelemetry/exporter-jaeger":"^0.20.0","@opentelemetry/node":"^0.20.0","@opentelemetry/tracing":"^0.20.0"},"gitHead":"89781f894dff1488c9794fd361dea0b63f4c9be3","readme":"# `instrumentation-testing-utils`\nUtils for testing open-telemetry instrumentation libraries\n\nThis package exports a mocah [root hook plugin](https://mochajs.org/#root-hook-plugins) and [global fixture](https://mochajs.org/#global-fixtures), which is taken care of common tasks that developer need to handle while writing unittests for instrumentations in node.\n\nThis package:\n- Initializes and registering a global trace provider for tests.\n- Registering a global memory exporter which can be referenced in test to access span.\n- Reseting the memory exporter before each test.\n- Optionally - export the test traces to Jaeger for convenience while debugging and developing.\n\nBy using this package, testing instrumentation code can be shorter, and bad practices are more easily avoided.\n\n## Supporter Version\nSince [root hook plugin](https://mochajs.org/#root-hook-plugins) are used, this package is compatible to mocha v8.0.0 and above. \n\n## Usage\n1. Add dev dependency on this package: `yarn add --dev opentelemetry-instrumentation-testing-utils`.\n2. `require` this package in mocha execution:\n\nAs command line argument option to mocha:\n```js\n    \"scripts\": {\n        \"test\": \"mocha --require opentelemetry-instrumentation-testing-utils\",\n        \"test:jaeger\": \"OTEL_EXPORTER_JAEGER_AGENT_HOST=localhost mocha --require opentelemetry-instrumentation-testing-utils\",\n    },\n``\n\nOr by using config file / package.json config:\n```js\n    \"mocha\": {\n        \"require\": [ \"opentelemetry-instrumentation-mocha\" ]\n    }\n```\n\n3. In your `.spec` file, import `getTestSpans` function and use it to make assertions in the test:\n```js\nimport { getTestSpans } from 'opentelemetry-instrumentation-testing-utils';\n\nit('some test', () => {\n    // your code that generate spans for this test\n    const spans: ReadableSpan[] = getTestSpans();\n    // your code doing assertions with the spans array\n});\n```\n\nThat's it - supper short and easy.","readmeFilename":"README.md","_id":"opentelemetry-instrumentation-testing-utils@0.0.0-2021-06-09--06-50","_nodeVersion":"12.22.1","_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","dist":{"integrity":"sha512-psHYbK3s8bGna+lgsljkZKbH0WIcLVN9uI1RcKi9IpINtyEaA30u+Ypy1rs91PmixEZl4u+9Lj+c/Zr/DVRjww==","shasum":"ce5a3950a8a85ca57e3a467535add20990b2aa7b","tarball":"https://registry.npmjs.org/opentelemetry-instrumentation-testing-utils/-/opentelemetry-instrumentation-testing-utils-0.0.0-2021-06-09--06-50.tgz","fileCount":10,"unpackedSize":19276,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwGTdCRA9TVsSAnZWagAAjAwP+weOJn0TsBsQZNSndWnK\ntSzRPSrnzyuBuXPPSMtER3H3FeS1teLp3KKLkaiu7n19wvFQ1LRCLQA6yUiT\nMgANZWY9z5QSOlwCp+9KlZOQwFkC11M3Nmj97+P7KdEJ8lSGc9CrxhaoCBAy\n9B+MDAvda4y/XXUMYdi5gY3yumkPwFpuvnE/u6fCEG1iR0P6ya2QP2Aq0Jtn\nFLiw5/x5tLsmHeJiKuoByCoPRMDBYv9krkSihJ8pknB7MDto80WY0Gw/hx0g\nWd8GGcmTXY13XPetnonohPPtAOEsKG58eXp3oBEXe+NvQQ5tqG23AHxUS2kw\nTxXkOb2mxZlqWjf2WyOGDkLTOtXh4nR+MTaDIrZRIa7975Edv5ZHiqktsaYm\nJuSQaiimGLt+VvclD1SAx49oQ/SRl7WLoRLS2aGaL1ySZVidgUcogiCVwsaS\nPLo2Ij3SRDsTUhHp7oLvxKqS7s6YQWc9k8W21ArkcWgTI3DsNdusgk75NRKN\nlaAk9/kt/9fUayqsA17Z0nO96II3e8Du3tlvMMV7LFr03dhg9SP48iZoVcic\ngreEcaqWaN/uvoMRDRDu+VDYZNe9tYjrzoQqVPkDBAKM3NKvN1CM4m11GpJ0\nrg8MbhiG+PUbGqR7x1hfTbPap8DqLN/ngD8gxO4X5fOLue3QiXsy3/00zqXu\nVGiR\r\n=uhOO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA0REoyl94e10NI9qZ995TTaa0+RAtzrzRP6BnS3cwfOAiArMgRfMP4Y096DI2DTVHkWbm7chzMOW4iThvrz5LGc5Q=="}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"aspecto-release-bot","email":"dev@aspecto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-instrumentation-testing-utils_0.0.0-2021-06-09--06-50_1623221469067_0.9007382903349255"},"_hasShrinkwrap":false},"0.5.0":{"name":"opentelemetry-instrumentation-testing-utils","version":"0.5.0","description":"utils for testing opentelemetry js instrumentation libraries","keywords":["opentelemetry","testing","instrumentation"],"homepage":"https://github.com/aspecto-io/opentelemetry-ext-js#readme","license":"Apache-2.0","main":"dist/src/index.js","repository":{"type":"git","url":"git+https://github.com/aspecto-io/opentelemetry-ext-js.git"},"scripts":{"build":"tsc","prepare":"yarn run build","watch":"tsc -w"},"bugs":{"url":"https://github.com/aspecto-io/opentelemetry-ext-js/issues"},"dependencies":{"@opentelemetry/api":"^0.20.0","@opentelemetry/exporter-jaeger":"^0.20.0","@opentelemetry/node":"^0.20.0","@opentelemetry/tracing":"^0.20.0"},"gitHead":"5d2d40dae3dde329743437740a7987ac53e7814d","_id":"opentelemetry-instrumentation-testing-utils@0.5.0","_nodeVersion":"12.22.1","_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","dist":{"integrity":"sha512-XYKVNM2uzb2URDy7qIcA65ijyAJ6mwtWwLbGcznAm1PdBTPc5VkvjIJgvoClUg1yYs4YqXa3Q9wnAWJiBKwlOA==","shasum":"7adde496bf7fb3e1bc35b179eafa3b7fcd682d89","tarball":"https://registry.npmjs.org/opentelemetry-instrumentation-testing-utils/-/opentelemetry-instrumentation-testing-utils-0.5.0.tgz","fileCount":10,"unpackedSize":19533,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwIYECRA9TVsSAnZWagAAz6cQAJRfMX7Oc02oMNpBdbkc\nV1y8V4TLWmUGRsAObdyOkqsOvTU1Sr5bJALp2Aw1+b0n0fFyFbvT4+qVXF1C\nm1KCzGyyqO+no9VFLNNpwBa7BT0+pVo3aH/T5vauzRgiexHvnt0/DolyHRQi\nHQ+gMJ27NJwc2+uEz6+IGpB9gOwoGi6rJ7C3xF/c3S9TH1v010XFJ+Ovjg0s\nusxpFrr27gLzfpZCLABlDLIxseEY94Pp8nhVCm4oQh2I0GJdxabpDz/FiNzc\n2S/fIcDKW8JZgE1dgj4xYD5QrabdTS0HT/dWSpJaB6GbZ+KpV/QnOiGQe2JJ\n/mVCDEzt7iHEPr7GjW11+ZkGWju6urfDD91xq+dXpjclfKra3Bha4mVRQD8J\nkmGROh+3/RKegfePScNo0ZfiPgzmzGWeRuL0We8LjqNKuF9QAG6tx8TrCweB\nggxl6E5put19hnqZoz7c1DRgaNffdKmNhA8Ewx28bR6NVSm26bMArBUmWvN3\nz3b/gOWTJ2Vzv/28h3M/BSDI5jKzxbkzWSeoMj5MM4LUtrxLjt4DizXfE5m5\nicop4r/fahqUFZnQknuENoo1a3i/EsSDNV1tIST29ubxvabiVALDj7oLGmDT\n4uV1JBwafc76qPem/rmMz8hiep9IShFLB/zqhsl1uj81qchvfTlE2EJcwQHn\nrgYZ\r\n=P1Q+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCMIcm37HMXzzAqv7hXQJ8DGA8BYUcrUTzgeQq3QNUNqwIhAOm0eScIgW0P9i/3FPRt074OZmk0nillVxkPg9fxlRWg"}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"aspecto-release-bot","email":"dev@aspecto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-instrumentation-testing-utils_0.5.0_1623229956750_0.30765536081896383"},"_hasShrinkwrap":false},"0.0.0-2021-06-14--13-06":{"name":"opentelemetry-instrumentation-testing-utils","version":"0.0.0-2021-06-14--13-06","description":"utils for testing opentelemetry js instrumentation libraries","keywords":["opentelemetry","testing","instrumentation"],"homepage":"https://github.com/aspecto-io/opentelemetry-ext-js#readme","license":"Apache-2.0","main":"dist/src/index.js","repository":{"type":"git","url":"git+https://github.com/aspecto-io/opentelemetry-ext-js.git"},"scripts":{"build":"tsc","prepare":"yarn run build","watch":"tsc -w"},"bugs":{"url":"https://github.com/aspecto-io/opentelemetry-ext-js/issues"},"dependencies":{"@opentelemetry/api":"^0.20.0","@opentelemetry/exporter-jaeger":"^0.20.0","@opentelemetry/node":"^0.20.0","@opentelemetry/tracing":"^0.20.0"},"gitHead":"7c1bec0d45e4e1729da931048881068dd80a4b90","readme":"# `instrumentation-testing-utils`\nUtils for testing open-telemetry instrumentation libraries\n\nThis package exports a mocah [root hook plugin](https://mochajs.org/#root-hook-plugins) and [global fixture](https://mochajs.org/#global-fixtures), which is taken care of common tasks that developer need to handle while writing unittests for instrumentations in node.\n\nThis package:\n- Initializes and registering a global trace provider for tests.\n- Registering a global memory exporter which can be referenced in test to access span.\n- Reseting the memory exporter before each test.\n- Optionally - export the test traces to Jaeger for convenience while debugging and developing.\n\nBy using this package, testing instrumentation code can be shorter, and bad practices are more easily avoided.\n\n## Supporter Version\nSince [root hook plugin](https://mochajs.org/#root-hook-plugins) are used, this package is compatible to mocha v8.0.0 and above. \n\n## Usage\n1. Add dev dependency on this package: `yarn add --dev opentelemetry-instrumentation-testing-utils`.\n2. `require` this package in mocha execution:\n\nAs command line argument option to mocha:\n```js\n    \"scripts\": {\n        \"test\": \"mocha --require opentelemetry-instrumentation-testing-utils\",\n        \"test:jaeger\": \"OTEL_EXPORTER_JAEGER_AGENT_HOST=localhost mocha --require opentelemetry-instrumentation-testing-utils\",\n    },\n``\n\nOr by using config file / package.json config:\n```js\n    \"mocha\": {\n        \"require\": [ \"opentelemetry-instrumentation-mocha\" ]\n    }\n```\n\n3. In your `.spec` file, import `getTestSpans` function and use it to make assertions in the test:\n```js\nimport { getTestSpans } from 'opentelemetry-instrumentation-testing-utils';\n\nit('some test', () => {\n    // your code that generate spans for this test\n    const spans: ReadableSpan[] = getTestSpans();\n    // your code doing assertions with the spans array\n});\n```\n\nThat's it - supper short and easy.","readmeFilename":"README.md","_id":"opentelemetry-instrumentation-testing-utils@0.0.0-2021-06-14--13-06","_nodeVersion":"12.22.1","_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","dist":{"integrity":"sha512-uao6mlYr9OctHL3hZEk2e5kMD65jcJWbgnP4ecTKUFPpZETJO0P1Uw1Bzb9h213m7DgpPOJdmbRqmh90IveXAQ==","shasum":"41bd2eb2a73b1709eed4923837898bfda0257531","tarball":"https://registry.npmjs.org/opentelemetry-instrumentation-testing-utils/-/opentelemetry-instrumentation-testing-utils-0.0.0-2021-06-14--13-06.tgz","fileCount":10,"unpackedSize":19551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgx1R+CRA9TVsSAnZWagAArfMP/10nRYW0uPPKr4n7iMD5\nnMK9yal7exzK3oEKfKF3B5JJp1OvoKMuAa3PJkJwLz0ff3PTnfJAuqar4xjF\nF3L2PXZESgzgAsgLCjNT9y4babsX+3xku7RB6zSOZJW5UTCX43+PmxHL0337\nlZNnf7XDmvr5iLlxoIon4sTi9/9Dw280TknWQHkmrLxd4ZuRlQ8L9O2VagdJ\nxkD6i2t5N5vnNic7BadP/FnnCgNSpr1cxv0qy2GDAQ6H164hKqCTH+hf2XJ7\nn8B0/LOTMkOdmk0M8BwA97GypHBE4mFCec2GavYN17q/Aot1OYhnl5u44sOl\n5YlzyJjz+kM4YgTb86NtbNU3bbLBhOtYSB8S185cvDdbHCLsLyBCRkU3Kay0\nmIEi4jj8bf8Tax7dge0TZBQX2vI7Gw/VxrP2WKuCohIOTfjCTwiNePnX0U6U\nsTkaAlmeq+puRM/2b7+wwEoroUe1vQTOMc2WM+UjUnQXotTH9thQSlABiz7x\nf/1cOqELQBRNZ4DE3f+x7r98eVgEVQfdN9o8UdrupGknj2NPsB6iUYSGu4c9\ns3++r0v+qLT5/FpYAn5/qK5cDWS7Wi9Fo8HEDycJopFI6l5zqyV6NXuALN9m\n7dn7atE2c+9aNUzWm1MJ68BAdOtMwpfmQNusAvzJA5CQzG4//qNTMqCpC9/s\nFbGp\r\n=h51J\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC5E9dWJJXQiua+MUxp93GeXCUZQYeJO/oF/gIkQ6mLJwIgRUVRIAP+zgEVYWjoBvKiB9mTI9oGrTvxEOp9eRL7wdI="}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"aspecto-release-bot","email":"dev@aspecto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-instrumentation-testing-utils_0.0.0-2021-06-14--13-06_1623676030399_0.7371341861606207"},"_hasShrinkwrap":false},"0.5.1":{"name":"opentelemetry-instrumentation-testing-utils","version":"0.5.1","description":"utils for testing opentelemetry js instrumentation libraries","keywords":["opentelemetry","testing","instrumentation"],"homepage":"https://github.com/aspecto-io/opentelemetry-ext-js#readme","license":"Apache-2.0","main":"dist/src/index.js","repository":{"type":"git","url":"git+https://github.com/aspecto-io/opentelemetry-ext-js.git"},"scripts":{"build":"tsc","prepare":"yarn run build","watch":"tsc -w"},"bugs":{"url":"https://github.com/aspecto-io/opentelemetry-ext-js/issues"},"dependencies":{"@opentelemetry/api":"^0.20.0","@opentelemetry/exporter-jaeger":"^0.20.0","@opentelemetry/node":"^0.20.0","@opentelemetry/tracing":"^0.20.0"},"gitHead":"5922581fbe66f3590eeabc9e1983e33fc1ab3021","_id":"opentelemetry-instrumentation-testing-utils@0.5.1","_nodeVersion":"12.22.1","_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","dist":{"integrity":"sha512-Kfp668uf+a96w4mV2BZBi88A7Igky3ANkdpORBGM7ABdl5EY8e2FmP90ET1TGKJldDKWPbTdXJYsVcWGqgen5w==","shasum":"4c46895ce2a60c788a259cf22cb1d389da83eaaf","tarball":"https://registry.npmjs.org/opentelemetry-instrumentation-testing-utils/-/opentelemetry-instrumentation-testing-utils-0.5.1.tgz","fileCount":10,"unpackedSize":19994,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgycJICRA9TVsSAnZWagAAgVwP/3x1uHG0aCQv+ikvSp1V\n4crUZRKtZZypI2uHsBS0rJQToOt5+12jnGhchHJJ0XDT0O1kHYIVLFMvQIlF\niHxtrXSE/Q1DDRhVBjqSBioeUbiUxXkmjdDRymAs9DBU3DI1s/Mxc8coo8rn\neXSabLS/oPBSylcrxk2E5zQOp/v1yz+8UFJRFL9LfWM5YolnqrocCEDUG7lU\nUAbAOrEFCc557hqF0QTdfUxHoAcAUeReHaxyMaxaer07xhS2Oy6cvGeNVjGO\nU7oIOvdDKQegXHFgZpHmyuB0OHf+fRz/RLCn7V3PiD84u9SgKD3m8QW7sAGh\n77UVpVIXZxb8p+iID+QvYNFw3XiYO/OEmIO6aciYTYtckrIZEcMOjjskw1KR\nPzV4ey3H0zhYGizOOfzhDgrhX9S9y+E7Y39Hyf6NrXWs2317ziEhXuOAKwFL\nZCGtLXB5W0jWgf5vqgyCpx0qZSWa8zIJOfs8+OHVusvKl1vbCVbrolzSmK1A\nsAEwSNY2mFl+Oin4zdXY0djDQ/6HCvsAnNtygtll1/C5BpVj3Zpk6NzYcdHf\n1GHG29nv2wzx3MAIgADvzLA2a8Q11Ldw0YB7DBZvlD4cXioE3BVMzRsLs5iV\nvIV+gKWi6fL2aBicFFA2XEBd15e2T+F28WdCAamI0TxJF1mUEnj6ib7eaI1+\nZPdY\r\n=dWaP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDg4KZLRfQAovuWsiuuydgIq9uZjIpLDvn6rm2a1B+vJwIgK6W/xcpurhq7aBkAkHIhaPMgmd89ZjQKpSv5ARi3Xps="}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"aspecto-release-bot","email":"dev@aspecto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-instrumentation-testing-utils_0.5.1_1623835208506_0.5168899216133549"},"_hasShrinkwrap":false},"0.0.0-2021-06-17--13-11":{"name":"opentelemetry-instrumentation-testing-utils","version":"0.0.0-2021-06-17--13-11","description":"utils for testing opentelemetry js instrumentation libraries","keywords":["opentelemetry","testing","instrumentation"],"homepage":"https://github.com/aspecto-io/opentelemetry-ext-js#readme","license":"Apache-2.0","main":"dist/src/index.js","repository":{"type":"git","url":"git+https://github.com/aspecto-io/opentelemetry-ext-js.git"},"scripts":{"build":"tsc","prepare":"yarn run build","watch":"tsc -w"},"bugs":{"url":"https://github.com/aspecto-io/opentelemetry-ext-js/issues"},"dependencies":{"@opentelemetry/api":"^0.20.0","@opentelemetry/exporter-jaeger":"^0.20.0","@opentelemetry/node":"^0.20.0","@opentelemetry/tracing":"^0.20.0"},"gitHead":"394b69f3cbe81fb9c51c6571e782f08126d97735","readme":"# `instrumentation-testing-utils`\nUtils for testing open-telemetry instrumentation libraries\n\nThis package exports a mocah [root hook plugin](https://mochajs.org/#root-hook-plugins) and [global fixture](https://mochajs.org/#global-fixtures), which is taken care of common tasks that developer need to handle while writing unittests for instrumentations in node.\n\nThis package:\n- Initializes and registering a global trace provider for tests.\n- Registering a global memory exporter which can be referenced in test to access span.\n- Reseting the memory exporter before each test.\n- Optionally - export the test traces to Jaeger for convenience while debugging and developing.\n\nBy using this package, testing instrumentation code can be shorter, and bad practices are more easily avoided.\n\n## Supporter Version\nSince [root hook plugin](https://mochajs.org/#root-hook-plugins) are used, this package is compatible to mocha v8.0.0 and above. \n\n## Usage\n1. Add dev dependency on this package: `yarn add --dev opentelemetry-instrumentation-testing-utils`.\n2. `require` this package in mocha execution:\n\nAs command line argument option to mocha:\n```js\n    \"scripts\": {\n        \"test\": \"mocha --require opentelemetry-instrumentation-testing-utils\",\n        \"test:jaeger\": \"OTEL_EXPORTER_JAEGER_AGENT_HOST=localhost mocha --require opentelemetry-instrumentation-testing-utils\",\n    },\n``\n\nOr by using config file / package.json config:\n```js\n    \"mocha\": {\n        \"require\": [ \"opentelemetry-instrumentation-mocha\" ]\n    }\n```\n\n3. In your `.spec` file, import `getTestSpans` function and use it to make assertions in the test:\n```js\nimport { getTestSpans } from 'opentelemetry-instrumentation-testing-utils';\n\nit('some test', () => {\n    // your code that generate spans for this test\n    const spans: ReadableSpan[] = getTestSpans();\n    // your code doing assertions with the spans array\n});\n```\n\nThat's it - supper short and easy.","readmeFilename":"README.md","_id":"opentelemetry-instrumentation-testing-utils@0.0.0-2021-06-17--13-11","_nodeVersion":"12.22.1","_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","dist":{"integrity":"sha512-TqwXnoWWg0zBFnS+c4p8YeLseIT2smAalQ93Fn3ELh3d5dW2rU3oNoiUmdF61WgRO+iIXUHllACVL2RgWUjWzw==","shasum":"b83f77b8e52a7b759e216484c38c768f9ab4a691","tarball":"https://registry.npmjs.org/opentelemetry-instrumentation-testing-utils/-/opentelemetry-instrumentation-testing-utils-0.0.0-2021-06-17--13-11.tgz","fileCount":10,"unpackedSize":20012,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgy0o0CRA9TVsSAnZWagAA9HMP/0XuNMG192MOTYFgLuRH\nHfVRSre+wpfO5dqE/J+1JaS+8sZCfX5Cl1hd8tplN2wWwAdo4Ee1l2uSLfe8\nRqM1E4JhViYwa6oiIasSy8l/4UljvXzV5HZ3vnQMdEG8pw+GC4b/ESEnaiaB\noBQo+7cIa7jXgHFu8WKaGZlS7ScpThQQuS/e7lLsPg2+O3jy0Wr/8Sp69A05\ncaqWaE4rPKpikXF7IAjwJw87Du9yiXzip4SHANu/iRv1bd1qafkkS4n0LVxs\nJOUcw2khTubub17a7kvN0Vv/Jl6Z8JBZeHGUkddC31jwt/EUSdgcHJJo2NBs\nkxcDVChP+1r5Kr1Mp46v7yXk3CyJC54O2BUK4Y/Gueh4fOvl3faSvEK+xqH5\nwXLRd+OMMlWN/4ee5SPS7xJ5ybSiIX11LZSOOtFiEu+mKAgUZb8VCfeYTgIH\n4UC28uS4dZ1sBkKW+tqcoKU66m0WlhVCnGplAcX36WkxtC+jKauAd14UwbL1\nnOvwDkc/ccok4WEMVh2jNN0yg6mAbjrbMLR3/J/CAFoSzvwh/07Er/slQDVt\nY1psHLT5fw6eWHeK94rDWn2I2Epze512sjeYl5k1xiPOK1Fz7GxwJQHae0Cs\nnmN0i37hlm4mK+H3iW9qbY9E3EGHrU3g8cVu57zc5WazScTfxKSwI+ROnQlE\nWlLF\r\n=61X5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCP3YOCF6kx5XHK39FFcKpPGMX30Go8A4Qs319GiY1f9gIgWgnQR6nBjXKp7d1ik6Jg0J4t9RzcZHtw/lKssvj1/3s="}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"aspecto-release-bot","email":"dev@aspecto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-instrumentation-testing-utils_0.0.0-2021-06-17--13-11_1623935539689_0.522450026142085"},"_hasShrinkwrap":false},"0.21.0":{"name":"opentelemetry-instrumentation-testing-utils","version":"0.21.0","description":"utils for testing opentelemetry js instrumentation libraries","keywords":["opentelemetry","testing","instrumentation"],"homepage":"https://github.com/aspecto-io/opentelemetry-ext-js#readme","license":"Apache-2.0","main":"dist/src/index.js","repository":{"type":"git","url":"git+https://github.com/aspecto-io/opentelemetry-ext-js.git"},"scripts":{"build":"tsc","prepare":"yarn run build","watch":"tsc -w"},"bugs":{"url":"https://github.com/aspecto-io/opentelemetry-ext-js/issues"},"peerDependencies":{"@opentelemetry/api":"^0.21.0"},"dependencies":{"@opentelemetry/exporter-jaeger":"^0.21.0","@opentelemetry/node":"^0.21.0","@opentelemetry/tracing":"^0.21.0"},"devDependencies":{"@opentelemetry/api":"^0.21.0"},"gitHead":"0eb9c76b2bbcf85cb228e2301ce0cc1346076808","_id":"opentelemetry-instrumentation-testing-utils@0.21.0","_nodeVersion":"12.22.1","_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","dist":{"integrity":"sha512-3sStNxzP1qgLxnMqa+30XFlq2vthKn85L1E7ISxX/XxgdjSO5akZzCK+X4IPyV9Nx7BZsm/qv9rG+c3lM92u9A==","shasum":"922ecc150665678810668a447581b8f4c7c88e73","tarball":"https://registry.npmjs.org/opentelemetry-instrumentation-testing-utils/-/opentelemetry-instrumentation-testing-utils-0.21.0.tgz","fileCount":10,"unpackedSize":20376,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgzxMfCRA9TVsSAnZWagAAF+oP/3+UtanKMdeHa2Rn4mcM\nhN4cCBVPdvofPVazI7q3LyjYqF5iggbZHMF8t1SucsPvWvqTUyBMyHt5jz09\nLdTHsMe2ChTqMExx8rPh+FtgQi/IYhIo+DsRiMVC+1mtqRixjlSWdAvcOnF8\nSEHy16W9kkQnzUyZi18CScSBB9LPFvpjra1s/uqi8u4VoGNPDZwWgSMqybCD\nuU3gJ+G8oEZ6Y0OzRmykQzooKi7DJHSmsXWfk5aNaPorfnHWADhEyqv3Q/wg\noymNRzypMkQyqA7zEScBmAxbI31wqZ/sGGMZ5BgxBX+T9Q5x3RUONu4RqjE+\ncq4gZGvN2VQGKYdx2AdGx4VLOkWf/JMfs77/uVhyDeAayTllrsneTX+IYqNO\n3QREAlfjG8y7pVoAMCD6FKghHrcdBiffWS7j45o2R5ANgwdH8gMWRoiS8nbX\n8Wt165FdxVQME51b8pLb7QFiF7YyGiHYgVWoGdxo1Zf2exYCWqtos0TnAjdR\npmHOEcaPaleMtEvrkiaHE1vDheiVlMy/I82hig5ReDW7Y1x53Mw9dVLbipUC\nU/udEvYC5i51qVN/nrKNIjNe4XSaZS79GfjBVvYh57SPtT+RMOdKZMsX2Ztd\n2E38cRJ3ytG9hWR7/UkKz1PL0koY2DuqX4czWYPLnQFnLXoCdnqurjhFi9ls\nyrDI\r\n=+OEB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGD7l2eAhss1mXpOJJx3WWxH1xmmM9GbJEJzCv0rtJGoAiEAim/9i62ACLXUm+9mgwejn1QwGYs4bK+Nt25Z+uxs28A="}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"aspecto-release-bot","email":"dev@aspecto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-instrumentation-testing-utils_0.21.0_1624183583152_0.5879246066538386"},"_hasShrinkwrap":false},"0.0.0-2021-06-23--07-47":{"name":"opentelemetry-instrumentation-testing-utils","version":"0.0.0-2021-06-23--07-47","description":"utils for testing opentelemetry js instrumentation libraries","keywords":["opentelemetry","testing","instrumentation"],"homepage":"https://github.com/aspecto-io/opentelemetry-ext-js#readme","license":"Apache-2.0","main":"dist/src/index.js","repository":{"type":"git","url":"git+https://github.com/aspecto-io/opentelemetry-ext-js.git"},"scripts":{"build":"tsc","prepare":"yarn run build","watch":"tsc -w"},"bugs":{"url":"https://github.com/aspecto-io/opentelemetry-ext-js/issues"},"peerDependencies":{"@opentelemetry/api":"^0.21.0"},"dependencies":{"@opentelemetry/exporter-jaeger":"^0.21.0","@opentelemetry/node":"^0.21.0","@opentelemetry/tracing":"^0.21.0"},"devDependencies":{"@opentelemetry/api":"^0.21.0"},"gitHead":"3aa46659e7d7b8cb0038645cab620fce3d08348d","readme":"# `instrumentation-testing-utils`\nUtils for testing open-telemetry instrumentation libraries\n\nThis package exports a mocah [root hook plugin](https://mochajs.org/#root-hook-plugins) and [global fixture](https://mochajs.org/#global-fixtures), which is taken care of common tasks that developer need to handle while writing unittests for instrumentations in node.\n\nThis package:\n- Initializes and registering a global trace provider for tests.\n- Registering a global memory exporter which can be referenced in test to access span.\n- Reseting the memory exporter before each test.\n- Optionally - export the test traces to Jaeger for convenience while debugging and developing.\n\nBy using this package, testing instrumentation code can be shorter, and bad practices are more easily avoided.\n\n## Supporter Version\nSince [root hook plugin](https://mochajs.org/#root-hook-plugins) are used, this package is compatible to mocha v8.0.0 and above. \n\n## Usage\n1. Add dev dependency on this package: `yarn add --dev opentelemetry-instrumentation-testing-utils`.\n2. `require` this package in mocha execution:\n\nAs command line argument option to mocha:\n```js\n    \"scripts\": {\n        \"test\": \"mocha --require opentelemetry-instrumentation-testing-utils\",\n        \"test:jaeger\": \"OTEL_EXPORTER_JAEGER_AGENT_HOST=localhost mocha --require opentelemetry-instrumentation-testing-utils\",\n    },\n``\n\nOr by using config file / package.json config:\n```js\n    \"mocha\": {\n        \"require\": [ \"opentelemetry-instrumentation-mocha\" ]\n    }\n```\n\n3. In your `.spec` file, import `getTestSpans` function and use it to make assertions in the test:\n```js\nimport { getTestSpans } from 'opentelemetry-instrumentation-testing-utils';\n\nit('some test', () => {\n    // your code that generate spans for this test\n    const spans: ReadableSpan[] = getTestSpans();\n    // your code doing assertions with the spans array\n});\n```\n\nThat's it - supper short and easy.","readmeFilename":"README.md","_id":"opentelemetry-instrumentation-testing-utils@0.0.0-2021-06-23--07-47","_nodeVersion":"12.22.1","_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","dist":{"integrity":"sha512-IS1raSkGWe7WIG4ABnGlXGyHhUbe4ezTsWOmg6KjlQV9P/Zeca2LVd8l/x4Bo0YtXZ74nt7Qrd/pSN+1wcQWkQ==","shasum":"70d8ad0b0fb80011b4be69e56610d3d4e7d448e1","tarball":"https://registry.npmjs.org/opentelemetry-instrumentation-testing-utils/-/opentelemetry-instrumentation-testing-utils-0.0.0-2021-06-23--07-47.tgz","fileCount":10,"unpackedSize":20393,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0udnCRA9TVsSAnZWagAAJL4P/i/6S3zPAEixGdCpno9A\nbteRvcvkHQ6nDxqOpwEmPC7CLDxh0iWr0+/zy10joofsP3werwcnAXGHobpk\n0VNxyGozLVrLnDUhTw221uwqGorSn9WlklmERHk6XKbsUViA22H9vC6XRAmr\np7vPvG9nDUHJjYHXjYkPbl1q4dMVmUyh71Wj52bSduDo+FFszdlC46GaNNbf\nE+jivpTfHMhcAwjPonnK5SYpISDQ5hEvfZ6NLYXT+6m4N/DFittuZAk9yuOh\nn0WJwVSWwp/lQkrQd2wGzAIFyUvBROkOdWiU8XD+bfx+kXsaWzhU2LzzaNkQ\nMSnh8gVEwnN/IDq9eDNRKB4mxzZC+jLLJrQ9JY+iAo0yctFN5rUCIFke0Df7\nh1ZSQ3/0a8reM40kr+1jpSVbevKTKBKNhT9AdpOsje6YrKImQZs39+IZ6ymi\nx/tvYbNR5fErZZ5loHbiMc+06Y7l9I/mhrZINRM2rn+U2gueTNZf2+ilNOrR\nEPBMgEJXzuDxRRvHKYpG0qYM7beew2aSudPvpNUEgQ8Kg/KMAjzJHKWCsany\n+C1wJDU/nDHhSieFqtYxg2FDz+MIU2Z8IVhAZl1RfIJliIHv7jk5FjX2YSsW\nl4ys6w+NhAnvORpuPfmumcNo/imCVSHLDNtiFF9XvUXUNOuqSxa6UJAR/mNV\n1yDX\r\n=LdqD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAl5LLCYl5V8ENEq77ImT0V+ucBwskaiAFZobaEHbIfiAiAV0RuHG7D/xSb0S65WD6SQPOMZI55WEAzzz4TZMU8L6g=="}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"aspecto-release-bot","email":"dev@aspecto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-instrumentation-testing-utils_0.0.0-2021-06-23--07-47_1624434535508_0.36915139759476534"},"_hasShrinkwrap":false},"0.0.0-2021-06-23--08-12":{"name":"opentelemetry-instrumentation-testing-utils","version":"0.0.0-2021-06-23--08-12","description":"utils for testing opentelemetry js instrumentation libraries","keywords":["opentelemetry","testing","instrumentation"],"homepage":"https://github.com/aspecto-io/opentelemetry-ext-js#readme","license":"Apache-2.0","main":"dist/src/index.js","repository":{"type":"git","url":"git+https://github.com/aspecto-io/opentelemetry-ext-js.git"},"scripts":{"build":"tsc","prepare":"yarn run build","watch":"tsc -w"},"bugs":{"url":"https://github.com/aspecto-io/opentelemetry-ext-js/issues"},"peerDependencies":{"@opentelemetry/api":"^0.21.0"},"dependencies":{"@opentelemetry/exporter-jaeger":"^0.21.0","@opentelemetry/node":"^0.21.0","@opentelemetry/tracing":"^0.21.0"},"devDependencies":{"@opentelemetry/api":"^0.21.0"},"gitHead":"9219abdec94e8dbeb50e61b1c289c60309c0a56c","readme":"# `instrumentation-testing-utils`\nUtils for testing open-telemetry instrumentation libraries\n\nThis package exports a mocah [root hook plugin](https://mochajs.org/#root-hook-plugins) and [global fixture](https://mochajs.org/#global-fixtures), which is taken care of common tasks that developer need to handle while writing unittests for instrumentations in node.\n\nThis package:\n- Initializes and registering a global trace provider for tests.\n- Registering a global memory exporter which can be referenced in test to access span.\n- Reseting the memory exporter before each test.\n- Optionally - export the test traces to Jaeger for convenience while debugging and developing.\n\nBy using this package, testing instrumentation code can be shorter, and bad practices are more easily avoided.\n\n## Supporter Version\nSince [root hook plugin](https://mochajs.org/#root-hook-plugins) are used, this package is compatible to mocha v8.0.0 and above. \n\n## Usage\n1. Add dev dependency on this package: `yarn add --dev opentelemetry-instrumentation-testing-utils`.\n2. `require` this package in mocha execution:\n\nAs command line argument option to mocha:\n```js\n    \"scripts\": {\n        \"test\": \"mocha --require opentelemetry-instrumentation-testing-utils\",\n        \"test:jaeger\": \"OTEL_EXPORTER_JAEGER_AGENT_HOST=localhost mocha --require opentelemetry-instrumentation-testing-utils\",\n    },\n``\n\nOr by using config file / package.json config:\n```js\n    \"mocha\": {\n        \"require\": [ \"opentelemetry-instrumentation-mocha\" ]\n    }\n```\n\n3. In your `.spec` file, import `getTestSpans` function and use it to make assertions in the test:\n```js\nimport { getTestSpans } from 'opentelemetry-instrumentation-testing-utils';\n\nit('some test', () => {\n    // your code that generate spans for this test\n    const spans: ReadableSpan[] = getTestSpans();\n    // your code doing assertions with the spans array\n});\n```\n\nThat's it - supper short and easy.","readmeFilename":"README.md","_id":"opentelemetry-instrumentation-testing-utils@0.0.0-2021-06-23--08-12","_nodeVersion":"12.22.1","_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","dist":{"integrity":"sha512-Y6BPbL0S0/99gIGeBQ87sKeDgHW7f4/0X7b5S8lNDopdn4ZfotI0vhRy2rvLlRhNPYX9JqXHOt+ZVt/tUR6XYg==","shasum":"3201c1f6733f96076bf4ea71bbb31a7734e6658a","tarball":"https://registry.npmjs.org/opentelemetry-instrumentation-testing-utils/-/opentelemetry-instrumentation-testing-utils-0.0.0-2021-06-23--08-12.tgz","fileCount":10,"unpackedSize":20393,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0u0XCRA9TVsSAnZWagAAwSsP/ia7fqR9u8ZAxoVHVqm1\nU3+H3CcBhlmjK58sQOOiLRZBOlT+PYB3/rl/pmaudOodc59aUdLn3FM1JDGM\nuNC6ucp30Emqm26BgYZliXUEGvM+mfGovX0U5RrwCmiyDNA+1H/7gmkBqYn0\niznDD7L3zRLDUR481mfksa6ctNSpsNT6FWDRFagJrTktxwInSOR5Yb4cEK1G\nYLGHwxthAqi74K2cQ35RPBEpQ6JP7F0b7bY1Nezmss9045qWuK1r0A3NIm2/\nfMc82rYmOvgnlJzQblwLFEazIPU7tkIpIAq+iVIIC6P4151QyFWZQZ/B0U9e\nM3jwW9EeiEvDRXYHA1ToY1gjjnKzIMqJKOVKP7mTUwttX2FKxofNvrkJF/4l\n8/tCVzC2NqZN6d7+GOTHLfU9GU/0HKeOSXW+mVh8J7y4a5oxV7KrTvrLnFqs\nOcZ56BMlkpywoZIeUngLq3HAFeCz3RePwYf3DaxL6/cF8T44yLmIQtNeE704\nkr09uwX9rXwEQJx7fFBsMMdrfMPG6rVcgD90qRclmL8aFVyr4jXGM2FpADP6\nlRm8mWjkaudBrifNRk3CgxrgXl8kXdnd3tjPFcO7M2g1tASuFIvdt7ASDToJ\nynv7PTnuMjh5kY3SJvxk4PQ7qb31k7Q81kWHA1K9dtJt9PRU4FwMykGr0sxe\nysE1\r\n=LPkb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC5Ms9HyDazlixGBY6JP/HK/cmJsVzE1at+22W4hWM/hwIhAJTFxl9v+Rp62nAwvnDMwZpq1VqvzpZWGRrOcX5QLnDv"}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"aspecto-release-bot","email":"dev@aspecto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-instrumentation-testing-utils_0.0.0-2021-06-23--08-12_1624435991617_0.55866995842877"},"_hasShrinkwrap":false},"0.0.0-2021-06-23--15-11":{"name":"opentelemetry-instrumentation-testing-utils","version":"0.0.0-2021-06-23--15-11","description":"utils for testing opentelemetry js instrumentation libraries","keywords":["opentelemetry","testing","instrumentation"],"homepage":"https://github.com/aspecto-io/opentelemetry-ext-js#readme","license":"Apache-2.0","main":"dist/src/index.js","repository":{"type":"git","url":"git+https://github.com/aspecto-io/opentelemetry-ext-js.git"},"scripts":{"build":"tsc","prepare":"yarn run build","watch":"tsc -w"},"bugs":{"url":"https://github.com/aspecto-io/opentelemetry-ext-js/issues"},"peerDependencies":{"@opentelemetry/api":"^0.21.0"},"dependencies":{"@opentelemetry/exporter-jaeger":"^0.21.0","@opentelemetry/node":"^0.21.0","@opentelemetry/tracing":"^0.21.0"},"devDependencies":{"@opentelemetry/api":"^0.21.0"},"gitHead":"7faff48d9d7740fef1b799dbbaf1dddc673aa97e","readme":"# `instrumentation-testing-utils`\nUtils for testing open-telemetry instrumentation libraries\n\nThis package exports a mocah [root hook plugin](https://mochajs.org/#root-hook-plugins) and [global fixture](https://mochajs.org/#global-fixtures), which is taken care of common tasks that developer need to handle while writing unittests for instrumentations in node.\n\nThis package:\n- Initializes and registering a global trace provider for tests.\n- Registering a global memory exporter which can be referenced in test to access span.\n- Reseting the memory exporter before each test.\n- Optionally - export the test traces to Jaeger for convenience while debugging and developing.\n\nBy using this package, testing instrumentation code can be shorter, and bad practices are more easily avoided.\n\n## Supporter Version\nSince [root hook plugin](https://mochajs.org/#root-hook-plugins) are used, this package is compatible to mocha v8.0.0 and above. \n\n## Usage\n1. Add dev dependency on this package: `yarn add --dev opentelemetry-instrumentation-testing-utils`.\n2. `require` this package in mocha execution:\n\nAs command line argument option to mocha:\n```js\n    \"scripts\": {\n        \"test\": \"mocha --require opentelemetry-instrumentation-testing-utils\",\n        \"test:jaeger\": \"OTEL_EXPORTER_JAEGER_AGENT_HOST=localhost mocha --require opentelemetry-instrumentation-testing-utils\",\n    },\n``\n\nOr by using config file / package.json config:\n```js\n    \"mocha\": {\n        \"require\": [ \"opentelemetry-instrumentation-mocha\" ]\n    }\n```\n\n3. In your `.spec` file, import `getTestSpans` function and use it to make assertions in the test:\n```js\nimport { getTestSpans } from 'opentelemetry-instrumentation-testing-utils';\n\nit('some test', () => {\n    // your code that generate spans for this test\n    const spans: ReadableSpan[] = getTestSpans();\n    // your code doing assertions with the spans array\n});\n```\n\nThat's it - supper short and easy.","readmeFilename":"README.md","_id":"opentelemetry-instrumentation-testing-utils@0.0.0-2021-06-23--15-11","_nodeVersion":"12.22.1","_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","dist":{"integrity":"sha512-u22FAGb6UcRur2XMNm1j0cCv9GOkac73I0paLV45Kz1o6565dOfCJ2UVrhZvxcZOzouxPoRpSq71MBdS8f/jpg==","shasum":"fba5581f37fe3c57e79fefd537e84b62e087afaa","tarball":"https://registry.npmjs.org/opentelemetry-instrumentation-testing-utils/-/opentelemetry-instrumentation-testing-utils-0.0.0-2021-06-23--15-11.tgz","fileCount":10,"unpackedSize":20393,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg009pCRA9TVsSAnZWagAAs3AP/05/Yep7k9RLiGmA/Eup\nvNJuKGVvYJOl2hL4tdX4eK9N3ZfaHVAbjyclJy1tW0+8bMP/YjoK523walVv\nVLgIpX2ABjbzdn/ZwrR5NhRwivdcQeKoLEIffOpa0OkFbwNnBT4w3jEnSAKp\nO/4ZSw7UcY2Jr4hjqJbOYqch1+gHR8pQZCnWQpVwAJ0nZyoiMJk95uCvGUvY\nLjzlOoaBfQLrMKOWntq/ZjtEch0x8Pbe6V7uZ/kMdaH/w3aYzF4Xtb93cVzr\nDShK0UUpjVhbH5VOU5u85GQ0BJ6aONuuYrr3ffAEwyQWMsRlDK8xswmu4477\nqmCs3ZKpLMVw+JsjhH7jqtx6HEqBF2mZ/Yg8Hkj42Y5MA9O2JZ3U1p7k3F+1\nlkkDE1/ZIGNo/G4bO2ghx+YLLS41zHv+CmH5o+kuALoHK0pLKZtJClNj60hI\nk7XsgLiffjmz8Z4301fSNnvDEcLoHKEoavrxPo2MAeI/+dLhDQX9PsCUAI2D\ndXYtgSaEx0rDBOFBmVtn6wp2iwOu6ijh8lmTmA6uTvY9BCJS1GW5yBZZFV90\nYIf+VkRmhXytm3bS97z/tneHyhofLsNEIYftLtilAhTMeVhRAjNUXq4okFdr\nLL3nxq2TqxN5aAbcP8wG+EM7YZ0kQT3xJkWdUstIzkMoN90pe9uUC5RJATbI\nPaPf\r\n=Xy0n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHoKSEKTjeCr3U/7lWP8VZSkgDpl0Ng39RqiZeZ7JGaaAiEAz9iA/h5J2vVH9NEZTK2Ccrir1RwV0ANSOEjO0DczX9g="}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"aspecto-release-bot","email":"dev@aspecto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-instrumentation-testing-utils_0.0.0-2021-06-23--15-11_1624461160987_0.4005906575731022"},"_hasShrinkwrap":false},"0.22.0":{"name":"opentelemetry-instrumentation-testing-utils","version":"0.22.0","description":"utils for testing opentelemetry js instrumentation libraries","keywords":["opentelemetry","testing","instrumentation"],"homepage":"https://github.com/aspecto-io/opentelemetry-ext-js#readme","license":"Apache-2.0","main":"dist/src/index.js","repository":{"type":"git","url":"git+https://github.com/aspecto-io/opentelemetry-ext-js.git"},"scripts":{"build":"tsc","prepare":"yarn run build","watch":"tsc -w"},"bugs":{"url":"https://github.com/aspecto-io/opentelemetry-ext-js/issues"},"peerDependencies":{"@opentelemetry/api":"^1.0.0"},"dependencies":{"@opentelemetry/exporter-jaeger":"^0.22.0","@opentelemetry/node":"^0.22.0","@opentelemetry/tracing":"^0.22.0"},"devDependencies":{"@opentelemetry/api":"^1.0.0"},"gitHead":"e9f830a131164f45fcfff1a527a0ade411e5e977","_id":"opentelemetry-instrumentation-testing-utils@0.22.0","_nodeVersion":"12.22.1","_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","dist":{"integrity":"sha512-8MhmG8XQR2pF0Y128LKq3MBz9MwQPQg4dAColAkyqYe+zqnoCEuZP+3C9xlvSeUoMIlMLZjHJcb4sVBWrCUZAg==","shasum":"9535facd11b2f1b386c398fcff5d0c72e7ff21be","tarball":"https://registry.npmjs.org/opentelemetry-instrumentation-testing-utils/-/opentelemetry-instrumentation-testing-utils-0.22.0.tgz","fileCount":10,"unpackedSize":20652,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2YhBCRA9TVsSAnZWagAAcCAQAKSfQLo37iWpEyiRSTU/\nz1SWPL7LY/s5Y6WZ2ZfAnvUgTVZEOFPiC9XTMofetSFIXYDrNaiMD5oUCMIM\nUB0abIlk7myGASnOr0eNXaA/VNQyqIQ2Y2cvBS4sREYNG3iJC7y91n2qGgq+\nQLuO1ASZXN3eZBvvzLAbtA+IjhTJYFTcY3ZumqLM7OZTX4S5Oyu42gaudLVG\nJWCqlyOEjM5WarBKwNvm+EFJ/yFCQSThJRkI/sQcLkL6YtfMqsyJJF+5SKZi\nOVQE7Ao0G4AeOQ9i5mbvaJ1yYonhk8zhJBIRO50mJGdNZ8O5FtBE8aEWJEw0\nnmGIpx7ftp1cD4Bdd70YcfIW8+GItAfqD1bU6t46o8flvmIIaZywjvMNFads\n0PqT5D9y1yLbpjvBQBQvJ0hqEDl42puCwu3VLZxXbdpbOuLnWKMc9hFB8EqW\n9gzdZWE13bxMhJIPaxJzGE/VaU3VT3MvwlDDvRx7Hnylh9PsDpxM0cYlXJVB\nKf7TpIpmRHelLkFc+OMa6V1ALVdd0vo00zH/tz2kNzdXhM6h1HpG82uTl3ni\nZtwHrVX1lFcrdhHtSzFfKJ98uZLBoll9jnw9dRm3E/8H9bqlqEdAem46y9Pt\nfKP3cBdLtbMWcSSg/geLQbvBtRRh0TZ9d/dceza/MCMxChulu+FIQ2FrUliu\nSXEX\r\n=LDcH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF7Li2RHVvjTa2HIF0qu9+L6SD2Mqrdb8AewARVNiK4iAiBmbGFAIAEgEi/9XmHJWsDhIM4KBmrO97n4plu/O20Epg=="}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"aspecto-release-bot","email":"dev@aspecto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-instrumentation-testing-utils_0.22.0_1624868929173_0.9137609679969596"},"_hasShrinkwrap":false},"0.22.1":{"name":"opentelemetry-instrumentation-testing-utils","version":"0.22.1","description":"utils for testing opentelemetry js instrumentation libraries","keywords":["opentelemetry","testing","instrumentation"],"homepage":"https://github.com/aspecto-io/opentelemetry-ext-js#readme","license":"Apache-2.0","main":"dist/src/index.js","repository":{"type":"git","url":"git+https://github.com/aspecto-io/opentelemetry-ext-js.git"},"scripts":{"build":"tsc","prepare":"yarn run build","watch":"tsc -w"},"bugs":{"url":"https://github.com/aspecto-io/opentelemetry-ext-js/issues"},"peerDependencies":{"@opentelemetry/api":"^1.0.0"},"dependencies":{"@opentelemetry/exporter-jaeger":"^0.22.0","@opentelemetry/node":"^0.22.0","@opentelemetry/tracing":"^0.22.0"},"devDependencies":{"@opentelemetry/api":"^1.0.0","typescript":"4.3.4"},"gitHead":"1b95f429902c848b03570501648d88c82ce78d46","_id":"opentelemetry-instrumentation-testing-utils@0.22.1","_nodeVersion":"12.22.1","_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","dist":{"integrity":"sha512-NCiDaViQqXeXcRT8r3Fv2O9vLjVYpr5iWAuN21P/+5l31mpQVKTiKzXrr8mw4NNaHcjvLQ4h2yiUP0/tVH3biA==","shasum":"2687657bab6f158dddd4215cf8369dfb8fd1be20","tarball":"https://registry.npmjs.org/opentelemetry-instrumentation-testing-utils/-/opentelemetry-instrumentation-testing-utils-0.22.1.tgz","fileCount":13,"unpackedSize":26243,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg4cS/CRA9TVsSAnZWagAA88wP/A2nOK1pQEW7jcAVVY9u\nNhbNZcexOtcN2e6NhuhtBCrU8oWT+JxFqb5vQzowduSVsX+Tw0FC74WPx6M5\n4yC6ooEPC+s7SFZe2ooQ1HAI6LZZPV4jatyKGbo6I6gpaaZXg4nKnWAtiNAd\nKisAO8LvcO8SPXujnYOoM9kFEsrVWX/yEOY93ue9OipfuEvajbMBqRyk9IfZ\nRUCq0CTu5NypDHGVYRcW4dFMKZaDF5aSqD/Nir+wgteHNqoaUSdVPVkG5zHt\nMnxjP4OFi3D1vUXH/dp39MKSuh5CKwvhTPCfvr9ZtPb/GgoxAIj5LElCqDs6\ninBZpEQMIHZWxIYlZM/tkZozf/bSXKNl/jnwuVqDWpt27sUo/Qdui0nQhUPK\nhuAJ0CPlcS5Ky48ZCrtk8wbZPYQfHlUdVQISwTxCOEYJoCLgz0uDkJyZQShQ\n5EOO7Ivy1xIfc4/jlkMWeIvIoemvwqE+dZ/VDmqu+UrT7e1bQ85u5JbHY2wB\nUXkeP01m0Adwg3UoKTG6MeW+itJ04RxvX2J323pv/iUPOTEedoh+HtwacIBX\n0cD5sixZgux98CUWTnHo4gsu1UKQPt/9SeRzg2EgpKBfq7GO/05yhmIxEMeB\nMQtYuI4fdoPPskPteY6hI2J3u46aKoAaICdBsikRC6t+zLeiHhQ+VgkYaeez\nF2vJ\r\n=m6NL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDp4D8Gd2kuWZOOPDu28ZP3tsy6u+peZhQvGbwInTRIFAIhALu86yAu39x3k6cfoBSy1gV64jKQFCFXu2bzDamB6HS3"}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"aspecto-release-bot","email":"dev@aspecto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-instrumentation-testing-utils_0.22.1_1625408703500_0.6446702485636382"},"_hasShrinkwrap":false},"0.23.0":{"name":"opentelemetry-instrumentation-testing-utils","version":"0.23.0","description":"utils for testing opentelemetry js instrumentation libraries","keywords":["opentelemetry","testing","instrumentation"],"homepage":"https://github.com/aspecto-io/opentelemetry-ext-js#readme","license":"Apache-2.0","main":"dist/src/index.js","repository":{"type":"git","url":"git+https://github.com/aspecto-io/opentelemetry-ext-js.git"},"scripts":{"build":"tsc","prepare":"yarn run build","watch":"tsc -w"},"bugs":{"url":"https://github.com/aspecto-io/opentelemetry-ext-js/issues"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"dependencies":{"@opentelemetry/exporter-jaeger":"^0.23.0","@opentelemetry/node":"^0.23.0","@opentelemetry/tracing":"^0.23.0"},"devDependencies":{"@opentelemetry/api":"^1.0.1","typescript":"4.3.4"},"gitHead":"8467cdc1e0c3192d196b26d12ff05d63d5284f72","_id":"opentelemetry-instrumentation-testing-utils@0.23.0","_nodeVersion":"12.22.1","_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","dist":{"integrity":"sha512-GbrUC/p5nz7RlX05mov3hMwVJZHHapQan0+uXpINAf21lUOWI2NMn55ckO9X+JoS4kf8LU6l6SL0DYYl8zNMhg==","shasum":"9d4c5c051e7cb105cc6f785c4bea59c92fd17630","tarball":"https://registry.npmjs.org/opentelemetry-instrumentation-testing-utils/-/opentelemetry-instrumentation-testing-utils-0.23.0.tgz","fileCount":13,"unpackedSize":26670,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg4tb4CRA9TVsSAnZWagAAzLkP+wd0dBpKlhnIvqU3psRh\nSrFJv5mpQza3mUdJkA8cQWhn1X2Byyq5ZCtxyKpflr4+QAtkJWUzN64Fu77E\n3S/4wTfk+6AtbAPu6i4uV/4DJOPxKW8Saia8//Oq8qLMD5MELMCMMfpOb06q\n3bx/jZBo/INR/69wNMRIIgrZle1olvEOv1cCpatRqhwoCg8qLOXkPsLniECJ\ntQ3eU4aM4twix5otSHW6awPxve6nXe8cYnD7Oo2F8IREPFVQS3BhE5DeqZkE\nuXJ0eporilStspMVW1EY5XkvFme2sH3HeVU29TmaUrhBzwzXDRgcKUegRU1T\nh3FQfvOmsW8JLzT4bv9YGLOrkfnMC7Kv2SuMdHEtcB/2sSV3OTTYuS4kSu5C\n9n+WBq3xFfJ8rZzOZaZYFnN5RU21/qmqVS07Am+l9vz0GSvaagss9s08mRw9\nlvrjlysIirpSNxEzYVVlnDEkUebLpc+5L5qWF1nA7p6lnKq/Ojs/gS4gnOvf\naNOTthfdNJzn1jNkn0Stvtt29ydzX5e6QxBindjX6RateGTbKECe9bXVwzPN\nuch+uFqi0fGxa4g1IyuUi3ctsSKwPTBYh364MHF950PJQcISbmoWyprcYgT5\nDbkTREhR2B8BwmSsGr6SvMD9wpeP4IDK+6Wxzt/irTyiWNXIgdiLSGyktsYz\nD1jE\r\n=J39q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD1X8+u3cA1EHGXHOeNYwWm4VJ6RBrQeHMOVZH1i+RKWQIgLBxqe8EoQItYu+pUbHAsVyVWpTOXJXfgQMUcYHDC3DI="}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"aspecto-release-bot","email":"dev@aspecto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-instrumentation-testing-utils_0.23.0_1625478904355_0.707237233740323"},"_hasShrinkwrap":false},"0.0.0-2021-08-01--12-54":{"name":"opentelemetry-instrumentation-testing-utils","version":"0.0.0-2021-08-01--12-54","description":"utils for testing opentelemetry js instrumentation libraries","keywords":["opentelemetry","testing","instrumentation"],"homepage":"https://github.com/aspecto-io/opentelemetry-ext-js#readme","license":"Apache-2.0","main":"dist/src/index.js","repository":{"type":"git","url":"git+https://github.com/aspecto-io/opentelemetry-ext-js.git"},"scripts":{"build":"tsc","prepare":"yarn run build","watch":"tsc -w"},"bugs":{"url":"https://github.com/aspecto-io/opentelemetry-ext-js/issues"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"dependencies":{"@opentelemetry/exporter-jaeger":"^0.24.0","@opentelemetry/node":"^0.24.0","@opentelemetry/tracing":"^0.24.0"},"devDependencies":{"@opentelemetry/api":"^1.0.2","typescript":"4.3.4"},"gitHead":"1c0b880a714e23ed5ba1ca97c35f49dc21064d8f","readme":"# `instrumentation-testing-utils`\nUtils for testing open-telemetry instrumentation libraries\n\nThis package exports a mocah [root hook plugin](https://mochajs.org/#root-hook-plugins) and [global fixture](https://mochajs.org/#global-fixtures), which is taken care of common tasks that developer need to handle while writing unittests for instrumentations in node.\n\nThis package:\n- Initializes and registering a global trace provider for tests.\n- Registering a global memory exporter which can be referenced in test to access span.\n- Reseting the memory exporter before each test.\n- Optionally - export the test traces to Jaeger for convenience while debugging and developing.\n\nBy using this package, testing instrumentation code can be shorter, and bad practices are more easily avoided.\n\n## Supporter Version\nSince [root hook plugin](https://mochajs.org/#root-hook-plugins) are used, this package is compatible to mocha v8.0.0 and above. \n\n## Usage\n1. Add dev dependency on this package: `yarn add --dev opentelemetry-instrumentation-testing-utils`.\n2. `require` this package in mocha execution:\n\nAs command line argument option to mocha:\n```js\n    \"scripts\": {\n        \"test\": \"mocha --require opentelemetry-instrumentation-testing-utils\",\n        \"test:jaeger\": \"OTEL_EXPORTER_JAEGER_AGENT_HOST=localhost mocha --require opentelemetry-instrumentation-testing-utils\",\n    },\n``\n\nOr by using config file / package.json config:\n```js\n    \"mocha\": {\n        \"require\": [ \"opentelemetry-instrumentation-mocha\" ]\n    }\n```\n\n3. In your `.spec` file, import `getTestSpans` function and use it to make assertions in the test:\n```js\nimport { getTestSpans } from 'opentelemetry-instrumentation-testing-utils';\n\nit('some test', () => {\n    // your code that generate spans for this test\n    const spans: ReadableSpan[] = getTestSpans();\n    // your code doing assertions with the spans array\n});\n```\n\nThat's it - supper short and easy.","readmeFilename":"README.md","_id":"opentelemetry-instrumentation-testing-utils@0.0.0-2021-08-01--12-54","_nodeVersion":"12.22.3","_npmVersion":"lerna/3.22.1/node@v12.22.3+x64 (linux)","dist":{"integrity":"sha512-krILS0YYXgGOWMODvHaenWIVXkuX4Ii+D7k8k3VT5K1Ror8JxwOueP5F1iSv1NLlhKF+kgTvHY6YjKSHJ/q0sA==","shasum":"c9e9f874868af7b92a5b7fe84e22ada3fd375482","tarball":"https://registry.npmjs.org/opentelemetry-instrumentation-testing-utils/-/opentelemetry-instrumentation-testing-utils-0.0.0-2021-08-01--12-54.tgz","fileCount":16,"unpackedSize":29833,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhBpm/CRA9TVsSAnZWagAAadAP/i2seZSK+92mNdPA918e\nC1s8+UzA58sf57nb/fOBaaCOD4XXjhTlrEy3R1O8gPv2NEzQDQuFCLKSr59n\nD5CDv9TlErbDTSwcUT2/1gaKUQf/wyLq0eR4jC8rwPAizhzD6Jtdbsjz5WpM\nXrnJyFNu9DxkDi1uGueIN+xN6g6hL/lY38xS+hCdiai+iMLa6BgKIdyjEJL3\nlagI78zZGCFLxorGxe6ArKEIZcVbdse/snMWlfJlC7Gu2Ve1XNIfsd0sBhHj\nr7quNZdzrwz+zZ/nTWW8x07rjkfOrZlSOBGm7BbCKFm10p6pp0rLZ+JhkU6+\n4Ug1kDL8ypVOlRs9Ddmz0YDWAfsLfvD2W49O4bmrE2/AC0Ly32GSnFXJSicP\nOuGBBAnFbZ+x3j9iCRVd9mzu5tXJoYmdPf2f8u5bfPsVpLGyKrgmdOsUVeVX\nsiIOGKgDqsHTcPJ7ErZpP1noAoFf6UZi+0UrzcVSq8AfVKXQJPLdZTNAqarF\nfOxSrFXFRy81gwaK1K1eA1+yhBwD4v9w2EBrC9noBI9yJxpAc0PAiCv2iSw1\n3tDAZIsdJ9T6XqQC3yKu6oKT9vPRUmnJkjFF8FzN7jzn88X8P1Tuu3yl0i0A\nWmo1rHrQSRZauX1Iw7f24Kj4s2N8XW94kByPB1mBVjsEjEFBmcACreUixp/g\n2gJh\r\n=cEGY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCnC0+XItbXX5B3Jh+9+BQEq6/9xu5PzQiRUUwe3o2+VAIgNzF306zu6ydZNU0e/2hHSknOxX4LysuiaOLDFUp3DYw="}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"aspecto-release-bot","email":"dev@aspecto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-instrumentation-testing-utils_0.0.0-2021-08-01--12-54_1627822526962_0.8824242210097035"},"_hasShrinkwrap":false},"0.24.0":{"name":"opentelemetry-instrumentation-testing-utils","version":"0.24.0","description":"utils for testing opentelemetry js instrumentation libraries","keywords":["opentelemetry","testing","instrumentation"],"homepage":"https://github.com/aspecto-io/opentelemetry-ext-js#readme","license":"Apache-2.0","main":"dist/src/index.js","repository":{"type":"git","url":"git+https://github.com/aspecto-io/opentelemetry-ext-js.git"},"scripts":{"build":"tsc","prepare":"yarn run build","watch":"tsc -w"},"bugs":{"url":"https://github.com/aspecto-io/opentelemetry-ext-js/issues"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"dependencies":{"@opentelemetry/exporter-jaeger":"^0.24.0","@opentelemetry/node":"^0.24.0","@opentelemetry/tracing":"^0.24.0"},"devDependencies":{"@opentelemetry/api":"^1.0.2","typescript":"4.3.4"},"gitHead":"f9d08fb8dd95cfad7658ed979c154cf75c979262","_id":"opentelemetry-instrumentation-testing-utils@0.24.0","_nodeVersion":"12.22.3","_npmVersion":"lerna/3.22.1/node@v12.22.3+x64 (linux)","dist":{"integrity":"sha512-zPgfgcQc1A86Lv0OK20YbefWS3SpQUBQk4RNanVSCCztYadEVnHWndZc4SGyP3yYl1VINqqNThgR5SdYQq30Ug==","shasum":"3cdefc0edfecab541286b854a283d472cd5d2a70","tarball":"https://registry.npmjs.org/opentelemetry-instrumentation-testing-utils/-/opentelemetry-instrumentation-testing-utils-0.24.0.tgz","fileCount":16,"unpackedSize":30278,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhBqzLCRA9TVsSAnZWagAAP5IP/iikqsrposSsWnC55y/S\nGkFwykuazP9k39UgzdTmEeleinMZPluMppy9X9bFzzoCLwvogR2PQE8Zs5Dt\n7KTVzFbyMF9VKB0FMy5XnteU1bj9e1pP/gvXdK0/d30HJwOz1UaSdRQ5Qo5O\nNlnXiAOAOdTafPwZtbEyLDBvR1lI5PRI71ujHR1Q1NnnNuFwCL/xEqChHW+W\nSDsKjI7zL4ibCbALXrLojVhs5Zr3hL0m0JjhKWna6Or1d6EjfLhrZNZhNjth\nV+6kVET8BML+EMdBrBuJ6dI/pkOIsBw81UOStKvj29XI/EFPESvJKhc7wVnT\ntuCpNqGQliBQdLgdTW1+Zc8bBkx2mn3UHIJqR2bvvQF2EcqmGYc+TXIfuLjt\nIK4vYHAtL17f2xfioTJxBEY+ox0TxKHtiJB75Mhyp1j+U50oriNr15hWuUKJ\nnGRb526uwg+919neSvv3gHM4wXVKJFxhF+iisBLE1btErTBz/GyjkQTiAEWW\nhVRtF5eNQpBlV4vaSSgKJSzXVJmhWufnT6gHqQ3P3yR2c12H64a2cnZ3t/Rb\nqpqVtBDarsbTJn2uWbco0DRBb8VxMRVP1MC3u09ocp1LMzNONSOnPPD5+RKQ\n6h+iHfA4ZbyEcfN6wCafRMjilhGohlHUg6HHmZu7wTKKzEpDrZoZAyBv7BRd\nS9FD\r\n=AzWu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHC47yXP+lPlT1nkZwrdmtUsf/LcEOvM7Ix508zJLkrlAiByyIES0M7W7jucyiEZXTWs6QWlX4G+WBocAjVaudyC9w=="}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"aspecto-release-bot","email":"dev@aspecto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-instrumentation-testing-utils_0.24.0_1627827403460_0.2092689538090513"},"_hasShrinkwrap":false},"0.24.1":{"name":"opentelemetry-instrumentation-testing-utils","version":"0.24.1","description":"utils for testing opentelemetry js instrumentation libraries","keywords":["opentelemetry","testing","instrumentation"],"homepage":"https://github.com/aspecto-io/opentelemetry-ext-js#readme","license":"Apache-2.0","main":"dist/src/index.js","repository":{"type":"git","url":"git+https://github.com/aspecto-io/opentelemetry-ext-js.git"},"scripts":{"build":"tsc","prepare":"yarn run build","watch":"tsc -w"},"bugs":{"url":"https://github.com/aspecto-io/opentelemetry-ext-js/issues"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"dependencies":{"@opentelemetry/exporter-jaeger":"^0.24.0","@opentelemetry/node":"^0.24.0","@opentelemetry/tracing":"^0.24.0"},"devDependencies":{"@opentelemetry/api":"^1.0.2","typescript":"4.3.4"},"gitHead":"5ef9753bf1ab525497b2b925df0b2e2f24ae838a","_id":"opentelemetry-instrumentation-testing-utils@0.24.1","_nodeVersion":"12.22.5","_npmVersion":"lerna/3.22.1/node@v12.22.5+x64 (linux)","dist":{"integrity":"sha512-cDhQUASAQYhbWfoPkugcs2ZgFCXr5H9/kUc/SQPVhbKzEm+ppmBB5iCy8pmaAcDajls58VbFfT/RCQIfFUCwmQ==","shasum":"5b30c551e95e93a24dff20421ddda10a153b8aa9","tarball":"https://registry.npmjs.org/opentelemetry-instrumentation-testing-utils/-/opentelemetry-instrumentation-testing-utils-0.24.1.tgz","fileCount":16,"unpackedSize":30807,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhL3RBCRA9TVsSAnZWagAAVu0P+wSjWsNlebxqbYV1TGYu\nLIiY0gIAiEfeh4EZv86yOCgwBYAH+AssuaF9McWT8D8gxMZTDUFL+eMqSVoI\nFpgywJuwMb5zm5+yiN7WmwIMlcdHBf5AR/el4adyzh/8hKBzyPGmgzvXV4yk\nhcKWo8GvIXztv0hnpoAVeSStIzkrrEvWgq4Vh9rBRgWMzCvJTUiloNvEz5BE\njoXvQmfaGeiWbSAwz9IR9jKSaql4DfH93paBVQYyf+6Zi+UReymJ0iu2ALo9\nefafAS88cSWDFddD6KLugjg5S1c4H8J/SgwsAzXHZ2ra9KGpc/UAIXdAVfax\nzHULRnkowFwMlauwN7mT9neAix/bCQExmtqC4+2PU27b9aXr4gXEphoVIRcJ\nQIuEpmyfdTyyKceq1O7s1lJc36ZBLnVDp2PRmITAqMJHMn9FgmmPsdnQskKl\n5rd+mHfc3ESpCwEgddX7pF/CQlu/a834VvKBneZuD/Z6EmQuBq/tLur+AKeY\nytU826HejFoRNuVFEzXh7lBBQxok9V5k5RlGUfJW+VmP1GtA0Zmn19qrflRo\ntcpVUu330I/EGTZ7/JcAZhmS04HlBNWydIn2ubUWCrPwsR1ufrUCqmdSLiCw\nD8F6gjukMMrrVrXiATix01YVKBLFc9s93VxmNY/Y0XiRqOn4RgCEsjIL2Hq+\nEceo\r\n=kjyG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD1XaWQVRspWq4+lNOYnHdFiFdWltn4PiI6IELTrxAEAwIhAJ1TxIFEUQw+NJO4jmvnfqsEEwEdaCSTE0u9IuBy+yI6"}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"aspecto-release-bot","email":"dev@aspecto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-instrumentation-testing-utils_0.24.1_1630499904957_0.37885360221283193"},"_hasShrinkwrap":false},"0.0.0-2021-09-19--10-26":{"name":"opentelemetry-instrumentation-testing-utils","version":"0.0.0-2021-09-19--10-26","description":"utils for testing opentelemetry js instrumentation libraries","keywords":["opentelemetry","testing","instrumentation"],"homepage":"https://github.com/aspecto-io/opentelemetry-ext-js#readme","license":"Apache-2.0","main":"dist/src/index.js","repository":{"type":"git","url":"git+https://github.com/aspecto-io/opentelemetry-ext-js.git"},"scripts":{"build":"tsc","prepare":"yarn run build","watch":"tsc -w"},"bugs":{"url":"https://github.com/aspecto-io/opentelemetry-ext-js/issues"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"dependencies":{"@opentelemetry/exporter-jaeger":"^0.25.0","@opentelemetry/sdk-trace-base":"^0.25.0","@opentelemetry/sdk-trace-node":"^0.25.0"},"devDependencies":{"@opentelemetry/api":"^1.0.2","typescript":"4.3.4"},"gitHead":"a05e1c6b765af7984ae8433da2290faf0c3387f6","readme":"# `instrumentation-testing-utils`\nUtils for testing open-telemetry instrumentation libraries\n\nThis package exports a mocah [root hook plugin](https://mochajs.org/#root-hook-plugins), which is taken care of common tasks that developer need to handle while writing unittests for instrumentations in node.\n\nThis package:\n- Initializes and registering a global trace provider for tests.\n- Registers a global memory exporter which can be referenced in test to access span.\n- Make sure there is only a single instance of an instrumentation class that is used across different `.spec.ts` files so patching is consistent and deterministic.\n- Reset the memory exporter before each test.\n- Optionally - export the test traces to Jaeger for convenience while debugging and developing.\n\nBy using this package, testing instrumentation code can be shorter, and bad practices are more easily avoided.\n\n## Supporter Version\nSince [root hook plugin](https://mochajs.org/#root-hook-plugins) are used, this package is compatible to mocha v8.0.0 and above. \n\n## Usage\n1. Add dev dependency on this package: \n\n```\nyarn add --dev opentelemetry-instrumentation-testing-utils\n```\n2. `require` this package in mocha execution:\n\nAs command line argument option to mocha:\n```js\n    \"scripts\": {\n        \"test\": \"mocha --require opentelemetry-instrumentation-testing-utils\",\n        \"test:jaeger\": \"OTEL_EXPORTER_JAEGER_AGENT_HOST=localhost mocha --require opentelemetry-instrumentation-testing-utils\",\n    },\n```\n\nOr by using config file / package.json config:\n```js\n    \"mocha\": {\n        \"require\": [ \"opentelemetry-instrumentation-mocha\" ]\n    }\n```\n\n3. In your `.spec` file, import `getTestSpans` and `registerInstrumentation` functions and use them to make assertions in the test:\n\n```js\nimport { getTestSpans, registerInstrumentation } from 'opentelemetry-instrumentation-testing-utils';\n\nconst instrumentation = registerInstrumentation(new MyAwesomeInstrumentation());\n\nit('some test', () => {\n    // your code that generate spans for this test\n    const spans: ReadableSpan[] = getTestSpans();\n    // your code doing assertions with the spans array\n});\n```\n\nThat's it - supper short and easy.\n","readmeFilename":"README.md","_id":"opentelemetry-instrumentation-testing-utils@0.0.0-2021-09-19--10-26","_nodeVersion":"12.22.6","_npmVersion":"lerna/3.22.1/node@v12.22.6+x64 (linux)","dist":{"integrity":"sha512-aul1fve6HeZBVuC7dn1rq9WT5CG4HnEhoQntPkHCJ38Ho2Ib8c7hwwMy704UxSEFdRhuisZmiNl38wCzDGjCMg==","shasum":"78225b3abfb28741a7c8c7069db452960bd776d0","tarball":"https://registry.npmjs.org/opentelemetry-instrumentation-testing-utils/-/opentelemetry-instrumentation-testing-utils-0.0.0-2021-09-19--10-26.tgz","fileCount":16,"unpackedSize":30947,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAhw5thpV86FMrYjjtrUxiM4d/MIv7atBXwyzYZwXQBBAiEA7A+rbCnJc+z78fOS730mksN+8HWwaeFEeuGCLcIcrlk="}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"aspecto-release-bot","email":"dev@aspecto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-instrumentation-testing-utils_0.0.0-2021-09-19--10-26_1632047262452_0.3826381890015875"},"_hasShrinkwrap":false},"0.25.0":{"name":"opentelemetry-instrumentation-testing-utils","version":"0.25.0","description":"utils for testing opentelemetry js instrumentation libraries","keywords":["opentelemetry","testing","instrumentation"],"homepage":"https://github.com/aspecto-io/opentelemetry-ext-js#readme","license":"Apache-2.0","main":"dist/src/index.js","repository":{"type":"git","url":"git+https://github.com/aspecto-io/opentelemetry-ext-js.git"},"scripts":{"build":"tsc","prepare":"yarn run build","watch":"tsc -w"},"bugs":{"url":"https://github.com/aspecto-io/opentelemetry-ext-js/issues"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"dependencies":{"@opentelemetry/exporter-jaeger":"^0.25.0","@opentelemetry/sdk-trace-base":"^0.25.0","@opentelemetry/sdk-trace-node":"^0.25.0"},"devDependencies":{"@opentelemetry/api":"^1.0.2","typescript":"4.3.4"},"gitHead":"c5d54414b125bbc927012c68ff19b97bcd5b3796","_id":"opentelemetry-instrumentation-testing-utils@0.25.0","_nodeVersion":"12.22.6","_npmVersion":"lerna/3.22.1/node@v12.22.6+x64 (linux)","dist":{"integrity":"sha512-Ig7MpmHBYMZSK6O1cUKo0o3TV3JlvcrIHNZlu7q+o8vdomNQ5Z7gWV46SEGOuvXpPY6i0fEFqlExLs/crxwSYw==","shasum":"cc36fc866046659d4ea6660c1b4fa7e6a6b6100f","tarball":"https://registry.npmjs.org/opentelemetry-instrumentation-testing-utils/-/opentelemetry-instrumentation-testing-utils-0.25.0.tgz","fileCount":16,"unpackedSize":31208,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4I4qlm9nIA1GUkN5f/gT/YIcwJB606I2MA14+bV0o1wIhALSar9XqMvE9ovaADy6nzGb24R6OF3KCRCHpdGz99UPU"}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"aspecto-release-bot","email":"dev@aspecto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-instrumentation-testing-utils_0.25.0_1632055479800_0.4097755781958692"},"_hasShrinkwrap":false},"0.0.0-2021-10-20--09-32":{"name":"opentelemetry-instrumentation-testing-utils","version":"0.0.0-2021-10-20--09-32","description":"utils for testing opentelemetry js instrumentation libraries","keywords":["opentelemetry","testing","instrumentation"],"homepage":"https://github.com/aspecto-io/opentelemetry-ext-js#readme","license":"Apache-2.0","main":"dist/src/index.js","repository":{"type":"git","url":"git+https://github.com/aspecto-io/opentelemetry-ext-js.git"},"scripts":{"build":"tsc","prepare":"yarn run build","watch":"tsc -w"},"bugs":{"url":"https://github.com/aspecto-io/opentelemetry-ext-js/issues"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"dependencies":{"@opentelemetry/exporter-jaeger":"^1.0.0","@opentelemetry/instrumentation":"^0.26.0","@opentelemetry/sdk-trace-base":"^1.0.0","@opentelemetry/sdk-trace-node":"^1.0.0"},"devDependencies":{"@opentelemetry/api":"1.0.1","typescript":"4.3.4"},"gitHead":"c1c35ba226e94cdc824171847a6e252e02912c55","readme":"# `instrumentation-testing-utils`\nUtils for testing open-telemetry instrumentation libraries\n\nThis package exports a mocah [root hook plugin](https://mochajs.org/#root-hook-plugins), which is taken care of common tasks that developer need to handle while writing unittests for instrumentations in node.\n\nThis package:\n- Initializes and registering a global trace provider for tests.\n- Registers a global memory exporter which can be referenced in test to access span.\n- Make sure there is only a single instance of an instrumentation class that is used across different `.spec.ts` files so patching is consistent and deterministic.\n- Reset the memory exporter before each test.\n- Optionally - export the test traces to Jaeger for convenience while debugging and developing.\n\nBy using this package, testing instrumentation code can be shorter, and bad practices are more easily avoided.\n\n## Supporter Version\nSince [root hook plugin](https://mochajs.org/#root-hook-plugins) are used, this package is compatible to mocha v8.0.0 and above. \n\n## Usage\n1. Add dev dependency on this package: \n\n```\nyarn add --dev opentelemetry-instrumentation-testing-utils\n```\n2. `require` this package in mocha execution:\n\nAs command line argument option to mocha:\n```js\n    \"scripts\": {\n        \"test\": \"mocha --require opentelemetry-instrumentation-testing-utils\",\n        \"test:jaeger\": \"OTEL_EXPORTER_JAEGER_AGENT_HOST=localhost mocha --require opentelemetry-instrumentation-testing-utils\",\n    },\n```\n\nOr by using config file / package.json config:\n```js\n    \"mocha\": {\n        \"require\": [ \"opentelemetry-instrumentation-mocha\" ]\n    }\n```\n\n3. In your `.spec` file, import `getTestSpans` and `registerInstrumentation` functions and use them to make assertions in the test:\n\n```js\nimport { getTestSpans, registerInstrumentation } from 'opentelemetry-instrumentation-testing-utils';\n\nconst instrumentation = registerInstrumentation(new MyAwesomeInstrumentation());\n\nit('some test', () => {\n    // your code that generate spans for this test\n    const spans: ReadableSpan[] = getTestSpans();\n    // your code doing assertions with the spans array\n});\n```\n\nThat's it - supper short and easy.\n","readmeFilename":"README.md","_id":"opentelemetry-instrumentation-testing-utils@0.0.0-2021-10-20--09-32","_nodeVersion":"12.22.6","_npmVersion":"lerna/3.22.1/node@v12.22.6+x64 (linux)","dist":{"integrity":"sha512-PlmjQQySgcBLFNB/ZvSpl0BxwIOtVXSZLG0wWlspWy7xTFIWdw0G9iVOzSTO1O8mvW6RA1OxXKmI8u7DOA+aiw==","shasum":"ed8d07c4d1eb440dada96fafda02e9cee1a41fa1","tarball":"https://registry.npmjs.org/opentelemetry-instrumentation-testing-utils/-/opentelemetry-instrumentation-testing-utils-0.0.0-2021-10-20--09-32.tgz","fileCount":16,"unpackedSize":31274,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPgVKGW5P0iDHqEIQl+alXj5FYbtMtnlwNMCHcSljdOwIhANJD13zw6K6WLBymXreiAVTDE0epQn3K5vDHEbcn/H8h"}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"aspecto-release-bot","email":"dev@aspecto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-instrumentation-testing-utils_0.0.0-2021-10-20--09-32_1634722389546_0.45942684821657087"},"_hasShrinkwrap":false},"0.26.0":{"name":"opentelemetry-instrumentation-testing-utils","version":"0.26.0","description":"utils for testing opentelemetry js instrumentation libraries","keywords":["opentelemetry","testing","instrumentation"],"homepage":"https://github.com/aspecto-io/opentelemetry-ext-js#readme","license":"Apache-2.0","main":"dist/src/index.js","repository":{"type":"git","url":"git+https://github.com/aspecto-io/opentelemetry-ext-js.git"},"scripts":{"build":"tsc","prepare":"yarn run build","watch":"tsc -w"},"bugs":{"url":"https://github.com/aspecto-io/opentelemetry-ext-js/issues"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"dependencies":{"@opentelemetry/exporter-jaeger":"^1.0.0","@opentelemetry/instrumentation":"^0.26.0","@opentelemetry/sdk-trace-base":"^1.0.0","@opentelemetry/sdk-trace-node":"^1.0.0"},"devDependencies":{"@opentelemetry/api":"1.0.1","typescript":"4.3.4"},"gitHead":"197677ba38ce47bdd7e57c9e74cc5a19fae7e8e2","_id":"opentelemetry-instrumentation-testing-utils@0.26.0","_nodeVersion":"12.22.7","_npmVersion":"lerna/3.22.1/node@v12.22.7+x64 (linux)","dist":{"integrity":"sha512-a3SdmTNrorFA0/5bUrU29/Bz3BiCD87uAGV6kOOwns56e9jAhMAlGdOq5tyCMnn/J/QCH4qTbrqMpzAs76E3Fg==","shasum":"479b77739599f1bf3dad2b3230888e860ccad957","tarball":"https://registry.npmjs.org/opentelemetry-instrumentation-testing-utils/-/opentelemetry-instrumentation-testing-utils-0.26.0.tgz","fileCount":16,"unpackedSize":31535,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC5tk+mlTyNsHvFocUSB0J8XcxfcwOXBYEBux0n2ZJcCQIhAKhluL62g1R8eXaTNm0hr7GUGsKSIO4spYLxf3TjtdZf"}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"aspecto-release-bot","email":"dev@aspecto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-instrumentation-testing-utils_0.26.0_1635276587816_0.8842586178688707"},"_hasShrinkwrap":false},"0.0.0-2021-12-15--12-47":{"name":"opentelemetry-instrumentation-testing-utils","version":"0.0.0-2021-12-15--12-47","description":"utils for testing opentelemetry js instrumentation libraries","keywords":["opentelemetry","testing","instrumentation"],"homepage":"https://github.com/aspecto-io/opentelemetry-ext-js#readme","license":"Apache-2.0","main":"dist/src/index.js","repository":{"type":"git","url":"git+https://github.com/aspecto-io/opentelemetry-ext-js.git"},"scripts":{"build":"tsc","prepare":"yarn run build","watch":"tsc -w"},"bugs":{"url":"https://github.com/aspecto-io/opentelemetry-ext-js/issues"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"dependencies":{"@opentelemetry/exporter-jaeger":"^1.0.1","@opentelemetry/instrumentation":"^0.27.0","@opentelemetry/sdk-trace-base":"^1.0.1","@opentelemetry/sdk-trace-node":"^1.0.1"},"devDependencies":{"@opentelemetry/api":"1.0.1","typescript":"4.3.4"},"gitHead":"d82d991f4f35f77cb8ac9071d7a43807667a17e2","readme":"# `instrumentation-testing-utils`\nUtils for testing open-telemetry instrumentation libraries\n\nThis package exports a mocah [root hook plugin](https://mochajs.org/#root-hook-plugins), which is taken care of common tasks that developer need to handle while writing unittests for instrumentations in node.\n\nThis package:\n- Initializes and registering a global trace provider for tests.\n- Registers a global memory exporter which can be referenced in test to access span.\n- Make sure there is only a single instance of an instrumentation class that is used across different `.spec.ts` files so patching is consistent and deterministic.\n- Reset the memory exporter before each test.\n- Optionally - export the test traces to Jaeger for convenience while debugging and developing.\n\nBy using this package, testing instrumentation code can be shorter, and bad practices are more easily avoided.\n\n## Supporter Version\nSince [root hook plugin](https://mochajs.org/#root-hook-plugins) are used, this package is compatible to mocha v8.0.0 and above. \n\n## Usage\n1. Add dev dependency on this package: \n\n```\nyarn add --dev opentelemetry-instrumentation-testing-utils\n```\n2. `require` this package in mocha execution:\n\nAs command line argument option to mocha:\n```js\n    \"scripts\": {\n        \"test\": \"mocha --require opentelemetry-instrumentation-testing-utils\",\n        \"test:jaeger\": \"OTEL_EXPORTER_JAEGER_AGENT_HOST=localhost mocha --require opentelemetry-instrumentation-testing-utils\",\n    },\n```\n\nOr by using config file / package.json config:\n```js\n    \"mocha\": {\n        \"require\": [ \"opentelemetry-instrumentation-mocha\" ]\n    }\n```\n\n3. In your `.spec` file, import `getTestSpans` and `registerInstrumentation` functions and use them to make assertions in the test:\n\n```js\nimport { getTestSpans, registerInstrumentation } from 'opentelemetry-instrumentation-testing-utils';\n\nconst instrumentation = registerInstrumentation(new MyAwesomeInstrumentation());\n\nit('some test', () => {\n    // your code that generate spans for this test\n    const spans: ReadableSpan[] = getTestSpans();\n    // your code doing assertions with the spans array\n});\n```\n\nThat's it - supper short and easy.\n","readmeFilename":"README.md","_id":"opentelemetry-instrumentation-testing-utils@0.0.0-2021-12-15--12-47","_nodeVersion":"12.22.7","_npmVersion":"lerna/3.22.1/node@v12.22.7+x64 (linux)","dist":{"integrity":"sha512-HZPdVTDXwJTVFphzbmWtdqUO+MRmt0s8vOwM9jJVdEBP5SIgUcblmnmj9xaulQ2/HUBhplqLeljDoMI9AKaYIg==","shasum":"505a2abd7dfe811d32dd880595f3b2af589cbf83","tarball":"https://registry.npmjs.org/opentelemetry-instrumentation-testing-utils/-/opentelemetry-instrumentation-testing-utils-0.0.0-2021-12-15--12-47.tgz","fileCount":16,"unpackedSize":31552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhueQ0CRA9TVsSAnZWagAAWa8P/2MZnSYpASs/HvKmN3dj\nVrshrc8slGdVcmZHbSvEslQ2abZCjB5TTGcnqpw0XrBtEJSL+IQdyYxu+SNV\n+9u6pCnCUKunl8qfNt8Y0UNeov0HAWEeUMAxuVJEJHOad6l7BS/eLAcKmuUj\nZFxGMk4UwDszFGxcUqxc5/X9lemWR/sIIRHxmnkNu3qIjz3KQF6QZOAiC09s\nAsTb/nCpmjJq51IB+rS3OhEMsrMsa2r3Gaf2SsuQmbFL6SBUoBK2TqMF8c5H\n16kYGHNP2WPlJdy+Wc4aoVrZ75ZDm+bJPOu/MbRDQ1KLBvYD/2Ge0DsIov/W\nEvghujjVsToX8WtxtTjmzA880LldUsID+Rou2c49Q7ziW2UQcZHiTHlJeKAP\nJeVT0eFuRXtl0lKNYmdBI8z+lIPQZ5clQvYLuA0YBtxJZMCe41Kgu/WLKUIb\nSHWHraqgZN8DOB5avYQUbTOTqLsu8qMk0yZphPXEpMO40todfDGEbFVT+ue3\nMofMsp0LJ1CPUUrUMsZf0rYRwg3/pOgn7CuBMQx7DKgfQFmD3fcoBvph87JU\n418QwSBnafhmdBMlyFhHRpED/nrzYSCA1lJx39haxmzSvAesQ9ozTc9TnG3I\nYn2i74k1zgas2HM+stqrcpPmVw5mSA7GtIeNyBcY4LKapQVcxuq1DTkjjYah\nrv8W\r\n=zfor\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD3P13bMvtKnDqvhZ4PvyusO//rAIudpy5mzu0K9WCY2gIhAIeLggu3LRAAsClvTLnv2z7YTGWntjZBzcXNLoF1bzBx"}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"aspecto-release-bot","email":"dev@aspecto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-instrumentation-testing-utils_0.0.0-2021-12-15--12-47_1639572532340_0.048830530167264685"},"_hasShrinkwrap":false},"0.0.0-2021-12-15--13-05":{"name":"opentelemetry-instrumentation-testing-utils","version":"0.0.0-2021-12-15--13-05","description":"utils for testing opentelemetry js instrumentation libraries","keywords":["opentelemetry","testing","instrumentation"],"homepage":"https://github.com/aspecto-io/opentelemetry-ext-js#readme","license":"Apache-2.0","main":"dist/src/index.js","repository":{"type":"git","url":"git+https://github.com/aspecto-io/opentelemetry-ext-js.git"},"scripts":{"build":"tsc","prepare":"yarn run build","watch":"tsc -w"},"bugs":{"url":"https://github.com/aspecto-io/opentelemetry-ext-js/issues"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"dependencies":{"@opentelemetry/exporter-jaeger":"^1.0.1","@opentelemetry/instrumentation":"^0.27.0","@opentelemetry/sdk-trace-base":"^1.0.1","@opentelemetry/sdk-trace-node":"^1.0.1"},"devDependencies":{"@opentelemetry/api":"1.0.1","typescript":"4.3.4"},"gitHead":"8500885ec40cd62c62efd9758ed4b005fc201674","readme":"# `instrumentation-testing-utils`\nUtils for testing open-telemetry instrumentation libraries\n\nThis package exports a mocah [root hook plugin](https://mochajs.org/#root-hook-plugins), which is taken care of common tasks that developer need to handle while writing unittests for instrumentations in node.\n\nThis package:\n- Initializes and registering a global trace provider for tests.\n- Registers a global memory exporter which can be referenced in test to access span.\n- Make sure there is only a single instance of an instrumentation class that is used across different `.spec.ts` files so patching is consistent and deterministic.\n- Reset the memory exporter before each test.\n- Optionally - export the test traces to Jaeger for convenience while debugging and developing.\n\nBy using this package, testing instrumentation code can be shorter, and bad practices are more easily avoided.\n\n## Supporter Version\nSince [root hook plugin](https://mochajs.org/#root-hook-plugins) are used, this package is compatible to mocha v8.0.0 and above. \n\n## Usage\n1. Add dev dependency on this package: \n\n```\nyarn add --dev opentelemetry-instrumentation-testing-utils\n```\n2. `require` this package in mocha execution:\n\nAs command line argument option to mocha:\n```js\n    \"scripts\": {\n        \"test\": \"mocha --require opentelemetry-instrumentation-testing-utils\",\n        \"test:jaeger\": \"OTEL_EXPORTER_JAEGER_AGENT_HOST=localhost mocha --require opentelemetry-instrumentation-testing-utils\",\n    },\n```\n\nOr by using config file / package.json config:\n```js\n    \"mocha\": {\n        \"require\": [ \"opentelemetry-instrumentation-mocha\" ]\n    }\n```\n\n3. In your `.spec` file, import `getTestSpans` and `registerInstrumentation` functions and use them to make assertions in the test:\n\n```js\nimport { getTestSpans, registerInstrumentation } from 'opentelemetry-instrumentation-testing-utils';\n\nconst instrumentation = registerInstrumentation(new MyAwesomeInstrumentation());\n\nit('some test', () => {\n    // your code that generate spans for this test\n    const spans: ReadableSpan[] = getTestSpans();\n    // your code doing assertions with the spans array\n});\n```\n\nThat's it - supper short and easy.\n","readmeFilename":"README.md","_id":"opentelemetry-instrumentation-testing-utils@0.0.0-2021-12-15--13-05","_nodeVersion":"12.22.7","_npmVersion":"lerna/3.22.1/node@v12.22.7+x64 (linux)","dist":{"integrity":"sha512-h5FmCc5+xyiVaND9fdVQB+jIJpbsNixi8I4gfa5sdN0nkB1wLnq9d7Q0LhAGMKL2GyM2SjOKN24tCY0q/98p1g==","shasum":"4dc10519f07ec7ddb466bf079e321afb16e2fb34","tarball":"https://registry.npmjs.org/opentelemetry-instrumentation-testing-utils/-/opentelemetry-instrumentation-testing-utils-0.0.0-2021-12-15--13-05.tgz","fileCount":16,"unpackedSize":31552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhueh2CRA9TVsSAnZWagAAggUP/3WlBbOynPQXVjyB9XDa\n+pvKvqd7tV2iMpjUFHhHhVF9ET0/O5S8vPFaCnbEO0cOlRkB01Diz0R0pM1d\nRRLInZDhwf3ochT7GsU7IGs6iUqJwyw26XTYBi65B72MJ0ITrA1rSXo/fPaG\nUp07D6Mti+RvPpFtwz96FTcOSLD7tmhozNLrJFTLBjieoUgZeYgaHqhSTRbC\nC9xA2wwzGqjj7hZtfqa5+yp0McRJeTRlvby/41zRBmwPTTuwisFZmNoTTL4O\n1Lu6DMiycxW8UCAAb8hP1AEKDHzJeTXPzkI70vflZOoXp4Xf1jkR/7MbeW9V\n+Z1kx5pHturzktA9QMkRUTTlDvbIjmJXS40nKJ9ArrCl74nSdX7rCyJVrW3a\nwnwGhXxoqfWf3PXAaTjBz4pJIMuINqldCGnb4jINTv9bDogRp/aLGdnilCe8\nqHZkCX0i7J75rz/OHB3VQ2Sck919w6DD37Nuw706ocbrTfV4RCSZR511TN8m\neXiQdJG37PJcbHOEiOqWOnqncvu4ujgkNkeoJescVOUIBuawaEQY7PN9Z3qE\nt7vrE0k+Ou9DJ0ZZAN2Z0J+CTm4mnYd0FJCYmdb1u9K17A3Kpt0g/1E+r54r\n0f57tihl3pRd+4gab9UHbrILR6kAoP29JGCBl/P3PFmLWPGQRnizaS5n7uTJ\nyJWR\r\n=wBH+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDqDEFjxgJOXf3mmiFdFtuVuHYz5AkgVM7A0+kTSmNywQIgZOamAPBNSh+V1E+XKyvzpTNJbmiZRVbQNOhqLaXYg0o="}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"aspecto-release-bot","email":"dev@aspecto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-instrumentation-testing-utils_0.0.0-2021-12-15--13-05_1639573622229_0.6942874074568692"},"_hasShrinkwrap":false},"0.0.0-2021-12-15--13-29":{"name":"opentelemetry-instrumentation-testing-utils","version":"0.0.0-2021-12-15--13-29","description":"utils for testing opentelemetry js instrumentation libraries","keywords":["opentelemetry","testing","instrumentation"],"homepage":"https://github.com/aspecto-io/opentelemetry-ext-js#readme","license":"Apache-2.0","main":"dist/src/index.js","repository":{"type":"git","url":"git+https://github.com/aspecto-io/opentelemetry-ext-js.git"},"scripts":{"build":"tsc","prepare":"yarn run build","watch":"tsc -w"},"bugs":{"url":"https://github.com/aspecto-io/opentelemetry-ext-js/issues"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"dependencies":{"@opentelemetry/exporter-jaeger":"^1.0.1","@opentelemetry/instrumentation":"^0.27.0","@opentelemetry/sdk-trace-base":"^1.0.1","@opentelemetry/sdk-trace-node":"^1.0.1"},"devDependencies":{"@opentelemetry/api":"1.0.1","typescript":"4.3.4"},"gitHead":"f57843bf0453b8bd2aa71246bd7cbd81e82539ef","readme":"# `instrumentation-testing-utils`\nUtils for testing open-telemetry instrumentation libraries\n\nThis package exports a mocah [root hook plugin](https://mochajs.org/#root-hook-plugins), which is taken care of common tasks that developer need to handle while writing unittests for instrumentations in node.\n\nThis package:\n- Initializes and registering a global trace provider for tests.\n- Registers a global memory exporter which can be referenced in test to access span.\n- Make sure there is only a single instance of an instrumentation class that is used across different `.spec.ts` files so patching is consistent and deterministic.\n- Reset the memory exporter before each test.\n- Optionally - export the test traces to Jaeger for convenience while debugging and developing.\n\nBy using this package, testing instrumentation code can be shorter, and bad practices are more easily avoided.\n\n## Supporter Version\nSince [root hook plugin](https://mochajs.org/#root-hook-plugins) are used, this package is compatible to mocha v8.0.0 and above. \n\n## Usage\n1. Add dev dependency on this package: \n\n```\nyarn add --dev opentelemetry-instrumentation-testing-utils\n```\n2. `require` this package in mocha execution:\n\nAs command line argument option to mocha:\n```js\n    \"scripts\": {\n        \"test\": \"mocha --require opentelemetry-instrumentation-testing-utils\",\n        \"test:jaeger\": \"OTEL_EXPORTER_JAEGER_AGENT_HOST=localhost mocha --require opentelemetry-instrumentation-testing-utils\",\n    },\n```\n\nOr by using config file / package.json config:\n```js\n    \"mocha\": {\n        \"require\": [ \"opentelemetry-instrumentation-mocha\" ]\n    }\n```\n\n3. In your `.spec` file, import `getTestSpans` and `registerInstrumentation` functions and use them to make assertions in the test:\n\n```js\nimport { getTestSpans, registerInstrumentation } from 'opentelemetry-instrumentation-testing-utils';\n\nconst instrumentation = registerInstrumentation(new MyAwesomeInstrumentation());\n\nit('some test', () => {\n    // your code that generate spans for this test\n    const spans: ReadableSpan[] = getTestSpans();\n    // your code doing assertions with the spans array\n});\n```\n\nThat's it - supper short and easy.\n","readmeFilename":"README.md","_id":"opentelemetry-instrumentation-testing-utils@0.0.0-2021-12-15--13-29","_nodeVersion":"12.22.7","_npmVersion":"lerna/3.22.1/node@v12.22.7+x64 (linux)","dist":{"integrity":"sha512-iOoHH46b2US6bYJt/sf1h14N8VVUtE3Tr3MStcY1FUBOFni2Tik3er/cVOcrsNAokLLlW2XYY6j2vFJEz+jJwQ==","shasum":"84c68e8d75c82ccec95b191d7c9024d22a3d9aec","tarball":"https://registry.npmjs.org/opentelemetry-instrumentation-testing-utils/-/opentelemetry-instrumentation-testing-utils-0.0.0-2021-12-15--13-29.tgz","fileCount":16,"unpackedSize":31552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhue4gCRA9TVsSAnZWagAAbpgP/ik/8K6orrcF7SXPw31h\n9uc3QfQCiYH96z1d9L1GXTjripJAugua/tS3MxUgdT5VrLY3G3QLcgpGoOtw\nXsaK//8iIJOMwTtbfqhFzNY4cyUEjBWKVrAyOdNZQnBcnCwt+e1aTyL5CHJ2\nQ5YXCpXWAUKl6qBSFt1lfoPmKfHuLPlZTVKBCZq2tWlvTVM9PcqowdLj3/jC\nUNdhGEP7rMv65M/tUu59re+N4bI2OzXfGRLdbOHgDRzwk/JKKeTLFkrjPmRU\negJz7Ke5AqGg9qtBYjwM584ETebQt+DZgJCT6RlDFQT4OIUUy6VFE165heX2\nwIKVDZb+2LlD1/OeiaKaVG0bgPhgsCiYdtkVQI1JUa5g1jpKHbAp7RzY03nA\nQh+s7MfrMiiYiXyKJ7Zf1yiZnu9KdH6GvKJnvfdrelgznvj7pcoDZMt8XI5Y\nSgS7pCK39zFYp8L9NljWh3IQRMD5LcFWZ84/tUJtKEUHHt/Zs2SHacqAyFSh\nYOu8AeaswBZF2A//KK7odw0HWNrtM+VNgb617nIcCRayyuaooLqTNkzUmmi6\nrMB8aFV1QXnd8XJm5XYgUoeWvpSzGcc8f3iNpPkN7Yohzo+0qGjLYfoTaQWH\nuh76y9AV9xuSQmDu0tkAiNRMS0sJUKSUWxReyUWMAvPwU+YiGkGGURzq7w6k\ntKi1\r\n=C+yV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDWp5vgLTFYmTzDrqLmrf/5L40EyoJorNY5JydsAHp2jAiAYjqk3IcagZC8ZyX1Ss7egCzcy4gf2gcBpd+VdFeqUyQ=="}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"aspecto-release-bot","email":"dev@aspecto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-instrumentation-testing-utils_0.0.0-2021-12-15--13-29_1639575072468_0.15278148932218483"},"_hasShrinkwrap":false},"0.0.0-2021-12-15--16-17":{"name":"opentelemetry-instrumentation-testing-utils","version":"0.0.0-2021-12-15--16-17","description":"utils for testing opentelemetry js instrumentation libraries","keywords":["opentelemetry","testing","instrumentation"],"homepage":"https://github.com/aspecto-io/opentelemetry-ext-js#readme","license":"Apache-2.0","main":"dist/src/index.js","repository":{"type":"git","url":"git+https://github.com/aspecto-io/opentelemetry-ext-js.git"},"scripts":{"build":"tsc","prepare":"yarn run build","watch":"tsc -w"},"bugs":{"url":"https://github.com/aspecto-io/opentelemetry-ext-js/issues"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"dependencies":{"@opentelemetry/exporter-jaeger":"^1.0.1","@opentelemetry/instrumentation":"^0.27.0","@opentelemetry/sdk-trace-base":"^1.0.1","@opentelemetry/sdk-trace-node":"^1.0.1"},"devDependencies":{"@opentelemetry/api":"1.0.1","typescript":"4.3.4"},"gitHead":"53721d6b1d7ef8fb79ab5167c34ee22da645bac0","readme":"# `instrumentation-testing-utils`\nUtils for testing open-telemetry instrumentation libraries\n\nThis package exports a mocah [root hook plugin](https://mochajs.org/#root-hook-plugins), which is taken care of common tasks that developer need to handle while writing unittests for instrumentations in node.\n\nThis package:\n- Initializes and registering a global trace provider for tests.\n- Registers a global memory exporter which can be referenced in test to access span.\n- Make sure there is only a single instance of an instrumentation class that is used across different `.spec.ts` files so patching is consistent and deterministic.\n- Reset the memory exporter before each test.\n- Optionally - export the test traces to Jaeger for convenience while debugging and developing.\n\nBy using this package, testing instrumentation code can be shorter, and bad practices are more easily avoided.\n\n## Supporter Version\nSince [root hook plugin](https://mochajs.org/#root-hook-plugins) are used, this package is compatible to mocha v8.0.0 and above. \n\n## Usage\n1. Add dev dependency on this package: \n\n```\nyarn add --dev opentelemetry-instrumentation-testing-utils\n```\n2. `require` this package in mocha execution:\n\nAs command line argument option to mocha:\n```js\n    \"scripts\": {\n        \"test\": \"mocha --require opentelemetry-instrumentation-testing-utils\",\n        \"test:jaeger\": \"OTEL_EXPORTER_JAEGER_AGENT_HOST=localhost mocha --require opentelemetry-instrumentation-testing-utils\",\n    },\n```\n\nOr by using config file / package.json config:\n```js\n    \"mocha\": {\n        \"require\": [ \"opentelemetry-instrumentation-mocha\" ]\n    }\n```\n\n3. In your `.spec` file, import `getTestSpans` and `registerInstrumentation` functions and use them to make assertions in the test:\n\n```js\nimport { getTestSpans, registerInstrumentation } from 'opentelemetry-instrumentation-testing-utils';\n\nconst instrumentation = registerInstrumentation(new MyAwesomeInstrumentation());\n\nit('some test', () => {\n    // your code that generate spans for this test\n    const spans: ReadableSpan[] = getTestSpans();\n    // your code doing assertions with the spans array\n});\n```\n\nThat's it - supper short and easy.\n","readmeFilename":"README.md","_id":"opentelemetry-instrumentation-testing-utils@0.0.0-2021-12-15--16-17","_nodeVersion":"12.22.7","_npmVersion":"lerna/3.22.1/node@v12.22.7+x64 (linux)","dist":{"integrity":"sha512-tHIwTECryNDz2kK8WwtRdBoDSwEf1lMpmFHYH81AAv7iXDXlkBlKe0m8BrE8uCbZJKGoed9AnpZ7VQOUT6atVA==","shasum":"f2540c10764d339cd7e698e549f782e0ad1e36c1","tarball":"https://registry.npmjs.org/opentelemetry-instrumentation-testing-utils/-/opentelemetry-instrumentation-testing-utils-0.0.0-2021-12-15--16-17.tgz","fileCount":16,"unpackedSize":31552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhuhVWCRA9TVsSAnZWagAAwtYQAJIeoE+baS1Wr0Dl2Rb+\nQvqNVc/iJb/Y9kkr9ie45apkTWGdzDfCVJnhwVarH5groh878LYEByKnftLi\nPnlXFb80voL4Ct0jMokHNdgSMWDuuS1UuKCG2RkYfUEDnLkGke+jv4k06jz2\nW2SV8nCPNKB+oc96vAq5UIW8B2IhSCkNW3nfN2l4gYLGaTN+dOTKCHcfwhAC\nqgHiwtWrtC+RZ69gwT8qv+Y825ICmVedBmGum8HHcsQKmdDW5RbguzSBB5kq\nJQptgddyTxAg7pWoc/VMFCSpUjaIo2u7zOk3ZM0EVsUSQGL0KFxQEsuwKWPt\nJi20J679JbKru2Kf/DdZrFWZMxsla1hPSiiPYD9Qp/Xyjdn95YuLi1Ah9WzV\nc7/hsM3Oo99N78vngypWb1q9uVABNh2VXSsnTC149IEg7asAdyqZUKW2aB98\n/zAxorzuqGUhvDsRkmXXd3OtPtmjy8FFcQX66N3SGzn4DVVTh6yXGebMi1fU\nFyiO5RQG+eRFsCLiFxHQvzdQ28utqsACCIZBzIptHVNBroc1J6Dkfk07qaSa\nl1hgkuHTRmjIkxKBoafe9d7PEJgaywHliXIvWVoMd+y9BLJGARsWmt1EZKU5\n60BjMqDSwyBMh+tMXi78cUdTeDuFmbAS+IjbibuanBLJdHu3ZvouDKnXl2ge\nnPkq\r\n=h0X6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCL+/M+hha5sKb9uyjkwY3E16HkV1TDbO8mq/q3rzGiCAIgDiXvOlMkDrsS/NPmhK6gDrT18tyocdg8sQxGnxwyPdw="}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"aspecto-release-bot","email":"dev@aspecto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-instrumentation-testing-utils_0.0.0-2021-12-15--16-17_1639585109971_0.4160451963806031"},"_hasShrinkwrap":false},"0.0.0-2021-12-20--13-41":{"name":"opentelemetry-instrumentation-testing-utils","version":"0.0.0-2021-12-20--13-41","description":"utils for testing opentelemetry js instrumentation libraries","keywords":["opentelemetry","testing","instrumentation"],"homepage":"https://github.com/aspecto-io/opentelemetry-ext-js#readme","license":"Apache-2.0","main":"dist/src/index.js","repository":{"type":"git","url":"git+https://github.com/aspecto-io/opentelemetry-ext-js.git"},"scripts":{"build":"tsc","prepare":"yarn run build","watch":"tsc -w"},"bugs":{"url":"https://github.com/aspecto-io/opentelemetry-ext-js/issues"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"dependencies":{"@opentelemetry/exporter-jaeger":"^1.0.1","@opentelemetry/instrumentation":"^0.27.0","@opentelemetry/sdk-trace-base":"^1.0.1","@opentelemetry/sdk-trace-node":"^1.0.1"},"devDependencies":{"@opentelemetry/api":"1.0.1","typescript":"4.3.4"},"gitHead":"5b751df473de22ae885ae8f740f8966736489a47","readme":"# `instrumentation-testing-utils`\nUtils for testing open-telemetry instrumentation libraries\n\nThis package exports a mocah [root hook plugin](https://mochajs.org/#root-hook-plugins), which is taken care of common tasks that developer need to handle while writing unittests for instrumentations in node.\n\nThis package:\n- Initializes and registering a global trace provider for tests.\n- Registers a global memory exporter which can be referenced in test to access span.\n- Make sure there is only a single instance of an instrumentation class that is used across different `.spec.ts` files so patching is consistent and deterministic.\n- Reset the memory exporter before each test.\n- Optionally - export the test traces to Jaeger for convenience while debugging and developing.\n\nBy using this package, testing instrumentation code can be shorter, and bad practices are more easily avoided.\n\n## Supporter Version\nSince [root hook plugin](https://mochajs.org/#root-hook-plugins) are used, this package is compatible to mocha v8.0.0 and above. \n\n## Usage\n1. Add dev dependency on this package: \n\n```\nyarn add --dev opentelemetry-instrumentation-testing-utils\n```\n2. `require` this package in mocha execution:\n\nAs command line argument option to mocha:\n```js\n    \"scripts\": {\n        \"test\": \"mocha --require opentelemetry-instrumentation-testing-utils\",\n        \"test:jaeger\": \"OTEL_EXPORTER_JAEGER_AGENT_HOST=localhost mocha --require opentelemetry-instrumentation-testing-utils\",\n    },\n```\n\nOr by using config file / package.json config:\n```js\n    \"mocha\": {\n        \"require\": [ \"opentelemetry-instrumentation-mocha\" ]\n    }\n```\n\n3. In your `.spec` file, import `getTestSpans` and `registerInstrumentation` functions and use them to make assertions in the test:\n\n```js\nimport { getTestSpans, registerInstrumentation } from 'opentelemetry-instrumentation-testing-utils';\n\nconst instrumentation = registerInstrumentation(new MyAwesomeInstrumentation());\n\nit('some test', () => {\n    // your code that generate spans for this test\n    const spans: ReadableSpan[] = getTestSpans();\n    // your code doing assertions with the spans array\n});\n```\n\nThat's it - supper short and easy.\n","readmeFilename":"README.md","_id":"opentelemetry-instrumentation-testing-utils@0.0.0-2021-12-20--13-41","_nodeVersion":"12.22.7","_npmVersion":"lerna/3.22.1/node@v12.22.7+x64 (linux)","dist":{"integrity":"sha512-7ndhOBfQK7jkQ1BEDKXcAf9CvoFxiOIqaKomqSUdmv/cvJ4/2N/0g9XHIHsIEHXlOw8wUlkAEa1gvLTqIzVxGQ==","shasum":"5a2574bc3693c25af48e13043635ff8b89ab7718","tarball":"https://registry.npmjs.org/opentelemetry-instrumentation-testing-utils/-/opentelemetry-instrumentation-testing-utils-0.0.0-2021-12-20--13-41.tgz","fileCount":16,"unpackedSize":31552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhwIg+CRA9TVsSAnZWagAAGZMP/AmLdMQnJhh2ZAO726P8\nu7OqDM5Z9AXZLCHFbhWNLS55iixpLybgGD6rjq23UzsUSMuWJXOxgzYr9bmx\nGleOzJGg3+lFMhfCuIyLrc3RKkWX2cWo24lrOam1IWDgV0VWsMQM0G4MyDbY\nBIS2d4RRS62WIWQaqrRmx6i9UmrsYJgRca/2ysaTGMb4An0YZBnCf7KXNUWP\nJj3XZpkrbTGCST4x7K5edN8ba5T2kGxhPKY1G3Z2+P+hG0Mw+Qac6A+PdcsY\nlb8SfqCb6+QV60FS/+Btk1A9rf29Lbg2lqRTZ1dEmLSQniQ5x258M9ZHmOnR\nR/RY3WWr9Ief3roJ9nj3urOCjk4lfauakARy9yfuA7hY1LjLRNjNuz4IIwfG\nfvgTAuhTNv5H1n9OP5zL4Lk8LKlPPlXSQAX6YgaJNoWyZvOaU5mbyIV4+bXF\nPYZdemVc4yLDcjYQBFwOfesyi1wVsM27v/47kKOPt6O9KTE0P3Mrk04DzpHV\nHXUYLc9/iZJ39htPQA7wFg/GI8ijcVJxFYhfTe1RkKWt5R9HJjRBCLQ1RvLi\nsAuqN/zkaYiElxqdQRfWxUeDCCptjLgMDfrlNM/ghzLKN9UhXwdZDYQ2zdW/\n8SLtExt1gJpvovuhNuOiSpE3yqZTEBcVZhe6sYBlpIWsWfAR2jW2f7wzip8t\nl7Jy\r\n=IuKp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCckXMqIerMOsLi4HEiUjMJvGz/a/1qprWQRs/TpLeurwIgKpowFxrRItkIzu5flt9YHGRPTiooNEB8IkPyQr97l9Q="}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"aspecto-release-bot","email":"dev@aspecto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-instrumentation-testing-utils_0.0.0-2021-12-20--13-41_1640007741872_0.5474746028521649"},"_hasShrinkwrap":false},"0.0.0-2021-12-21--15-57":{"name":"opentelemetry-instrumentation-testing-utils","version":"0.0.0-2021-12-21--15-57","description":"utils for testing opentelemetry js instrumentation libraries","keywords":["opentelemetry","testing","instrumentation"],"homepage":"https://github.com/aspecto-io/opentelemetry-ext-js#readme","license":"Apache-2.0","main":"dist/src/index.js","repository":{"type":"git","url":"git+https://github.com/aspecto-io/opentelemetry-ext-js.git"},"scripts":{"build":"tsc","prepare":"yarn run build","watch":"tsc -w"},"bugs":{"url":"https://github.com/aspecto-io/opentelemetry-ext-js/issues"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"dependencies":{"@opentelemetry/exporter-jaeger":"^1.0.1","@opentelemetry/instrumentation":"^0.27.0","@opentelemetry/sdk-trace-base":"^1.0.1","@opentelemetry/sdk-trace-node":"^1.0.1"},"devDependencies":{"@opentelemetry/api":"1.0.1","typescript":"4.3.4"},"gitHead":"38372fee8eae66fb9be8d9e8093823c76ba1388a","readme":"# `instrumentation-testing-utils`\nUtils for testing open-telemetry instrumentation libraries\n\nThis package exports a mocah [root hook plugin](https://mochajs.org/#root-hook-plugins), which is taken care of common tasks that developer need to handle while writing unittests for instrumentations in node.\n\nThis package:\n- Initializes and registering a global trace provider for tests.\n- Registers a global memory exporter which can be referenced in test to access span.\n- Make sure there is only a single instance of an instrumentation class that is used across different `.spec.ts` files so patching is consistent and deterministic.\n- Reset the memory exporter before each test.\n- Optionally - export the test traces to Jaeger for convenience while debugging and developing.\n\nBy using this package, testing instrumentation code can be shorter, and bad practices are more easily avoided.\n\n## Supporter Version\nSince [root hook plugin](https://mochajs.org/#root-hook-plugins) are used, this package is compatible to mocha v8.0.0 and above. \n\n## Usage\n1. Add dev dependency on this package: \n\n```\nyarn add --dev opentelemetry-instrumentation-testing-utils\n```\n2. `require` this package in mocha execution:\n\nAs command line argument option to mocha:\n```js\n    \"scripts\": {\n        \"test\": \"mocha --require opentelemetry-instrumentation-testing-utils\",\n        \"test:jaeger\": \"OTEL_EXPORTER_JAEGER_AGENT_HOST=localhost mocha --require opentelemetry-instrumentation-testing-utils\",\n    },\n```\n\nOr by using config file / package.json config:\n```js\n    \"mocha\": {\n        \"require\": [ \"opentelemetry-instrumentation-mocha\" ]\n    }\n```\n\n3. In your `.spec` file, import `getTestSpans` and `registerInstrumentation` functions and use them to make assertions in the test:\n\n```js\nimport { getTestSpans, registerInstrumentation } from 'opentelemetry-instrumentation-testing-utils';\n\nconst instrumentation = registerInstrumentation(new MyAwesomeInstrumentation());\n\nit('some test', () => {\n    // your code that generate spans for this test\n    const spans: ReadableSpan[] = getTestSpans();\n    // your code doing assertions with the spans array\n});\n```\n\nThat's it - supper short and easy.\n","readmeFilename":"README.md","_id":"opentelemetry-instrumentation-testing-utils@0.0.0-2021-12-21--15-57","_nodeVersion":"12.22.7","_npmVersion":"lerna/3.22.1/node@v12.22.7+x64 (linux)","dist":{"integrity":"sha512-08JLlR6+uNHE5b2Vg9bNt7X44fCOMaF7f2MEBjsG+J6oE/zsVKOwXwf/oZqX+tl1wQmF6WsvSi+1+/lwQQPc4Q==","shasum":"ea2d00aa84f5908e7a0ec46f4504f93060108ce6","tarball":"https://registry.npmjs.org/opentelemetry-instrumentation-testing-utils/-/opentelemetry-instrumentation-testing-utils-0.0.0-2021-12-21--15-57.tgz","fileCount":16,"unpackedSize":31552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhwfmxCRA9TVsSAnZWagAAl54P/1kPAAEJqKocOTDVfRDs\n/CW56gMOu0XsTooFn2n2SO4jLXCwW8K1+hw+PJnszzxM4Iw+R5XDDtQuhDbu\n1H0ddCW9aAQ08DYvJqikEyzlXVAL5FpVIBjBqXCU/BCM8tTQB+LDgQSXH05f\nL74X+KIdzSajIfsXGf+7PNmSiQvzz7ULuQpPy0qFRppC6I6lQgE+TZqtJwMB\n74oHDt2eqGK9wOiXj3duFxH91Dx0w4ilRH01moHXPmlTHpTet1HTtDTlt7Ev\nk1PmyPcKEQ+2k6YLtbMoLkdBCaHK1Wpg/FQnOzNuvyaYAcQhHMVZUCSaXwx5\nJxnDL2GwVQcUOHiJUCZ9eYNv03Qv77zOUIg/bI0WVn5E9OQW3jRpKo5l7bvA\naanM0Oi8d0EwZVKjfq3lq18sIf4VNlySh7VC+yb9rEaTMnVpxcxmU2cha5T8\ncSXWW6eXMQ5bg9qh63lkOSh8N9uWIC7u8u0qgnmN+YZ3TIWNaUoqSjbjmbHL\n3IW4j6qVLBFEjyLEtT1F39qKDVah4vWhY5dw/XFnPSV8REgg5LFlZMlm49If\nbS9zikJfuiNZ/4Ey+2BKoQgPT71B5VLkomxGTjqajGkNJVBwm2pWUZgnGF9a\nEp1houY9nB5vd//9rRak2Ab1pHs2F5kzBzlge9ZIUaRnMEWGVDc2GbkNktb7\nof36\r\n=fat2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGyLlLw1iDTykot2dsLbFTQzCsvs3YClba5C2/droVwBAiBdNmN+/a0aXdfu1kMSXyma/XPOeAp7SyWxjEfAjdRN7A=="}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"aspecto-release-bot","email":"dev@aspecto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-instrumentation-testing-utils_0.0.0-2021-12-21--15-57_1640102321572_0.08137027915563877"},"_hasShrinkwrap":false},"0.0.0-2021-12-22--14-33":{"name":"opentelemetry-instrumentation-testing-utils","version":"0.0.0-2021-12-22--14-33","description":"utils for testing opentelemetry js instrumentation libraries","keywords":["opentelemetry","testing","instrumentation"],"homepage":"https://github.com/aspecto-io/opentelemetry-ext-js#readme","license":"Apache-2.0","main":"dist/src/index.js","repository":{"type":"git","url":"git+https://github.com/aspecto-io/opentelemetry-ext-js.git"},"scripts":{"build":"tsc","prepare":"yarn run build","watch":"tsc -w"},"bugs":{"url":"https://github.com/aspecto-io/opentelemetry-ext-js/issues"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"dependencies":{"@opentelemetry/exporter-jaeger":"^1.0.0","@opentelemetry/instrumentation":"^0.26.0","@opentelemetry/sdk-trace-base":"^1.0.0","@opentelemetry/sdk-trace-node":"^1.0.0"},"devDependencies":{"@opentelemetry/api":"1.0.1","typescript":"4.3.4"},"gitHead":"7aa0240a479398d794813dc4088689d9d25bf6fc","readme":"# `instrumentation-testing-utils`\nUtils for testing open-telemetry instrumentation libraries\n\nThis package exports a mocah [root hook plugin](https://mochajs.org/#root-hook-plugins), which is taken care of common tasks that developer need to handle while writing unittests for instrumentations in node.\n\nThis package:\n- Initializes and registering a global trace provider for tests.\n- Registers a global memory exporter which can be referenced in test to access span.\n- Make sure there is only a single instance of an instrumentation class that is used across different `.spec.ts` files so patching is consistent and deterministic.\n- Reset the memory exporter before each test.\n- Optionally - export the test traces to Jaeger for convenience while debugging and developing.\n\nBy using this package, testing instrumentation code can be shorter, and bad practices are more easily avoided.\n\n## Supporter Version\nSince [root hook plugin](https://mochajs.org/#root-hook-plugins) are used, this package is compatible to mocha v8.0.0 and above. \n\n## Usage\n1. Add dev dependency on this package: \n\n```\nyarn add --dev opentelemetry-instrumentation-testing-utils\n```\n2. `require` this package in mocha execution:\n\nAs command line argument option to mocha:\n```js\n    \"scripts\": {\n        \"test\": \"mocha --require opentelemetry-instrumentation-testing-utils\",\n        \"test:jaeger\": \"OTEL_EXPORTER_JAEGER_AGENT_HOST=localhost mocha --require opentelemetry-instrumentation-testing-utils\",\n    },\n```\n\nOr by using config file / package.json config:\n```js\n    \"mocha\": {\n        \"require\": [ \"opentelemetry-instrumentation-mocha\" ]\n    }\n```\n\n3. In your `.spec` file, import `getTestSpans` and `registerInstrumentation` functions and use them to make assertions in the test:\n\n```js\nimport { getTestSpans, registerInstrumentation } from 'opentelemetry-instrumentation-testing-utils';\n\nconst instrumentation = registerInstrumentation(new MyAwesomeInstrumentation());\n\nit('some test', () => {\n    // your code that generate spans for this test\n    const spans: ReadableSpan[] = getTestSpans();\n    // your code doing assertions with the spans array\n});\n```\n\nThat's it - supper short and easy.\n","readmeFilename":"README.md","_id":"opentelemetry-instrumentation-testing-utils@0.0.0-2021-12-22--14-33","_nodeVersion":"12.22.8","_npmVersion":"lerna/3.22.1/node@v12.22.8+x64 (linux)","dist":{"integrity":"sha512-P7AEWhnCSvcR6BZRlcUiYz1ckVgYzSD2MmxYCFYb3HkiOVS49sM9/vW5NJefn2padkRV+Zz7fN6cg5Y5dP+zAQ==","shasum":"70a09d0b2cb6796fbf02397a0f0fffc2bce24695","tarball":"https://registry.npmjs.org/opentelemetry-instrumentation-testing-utils/-/opentelemetry-instrumentation-testing-utils-0.0.0-2021-12-22--14-33.tgz","fileCount":16,"unpackedSize":31552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhwzftCRA9TVsSAnZWagAA3UcP/idTyuZfV/mWf3mWdE65\nKkmWSi4HaOpxckB99Jpsd1eYC4XnHYuXf/PidkKeto4dlLLrnvd+lQ1lUwMb\njhwRXrC3psLKcXcdMOurGEGBP+7hrNuUS8cBQioZf1UIwJDQWyxSOUf2Ucpg\nHoX0T2yjjMftHQwjiR8mFwuBhxzenlqROP89T4ynTQqjWF0zbOYwBgHNOZvF\ng0/Zl0viWUrokij1PkbVG8RJQvziQekVZWTiB05QsQuM9CUbo2g6T+zqnx1N\nrg8xVbrdnMex0OGzH0oyZJx8gVlYTlI8P5C6lvi/9WeyMCo/k6ySMyR96tn6\nfMmp0EWW6WVrznw5Uk0UsqhJF0NyDaPWyiqrN3rxteHfJgyVxz8PZQnWjpVT\nBB6soMKA3Mao0aYNCVmaCFluy41orkqPFg/mfD/jhXx2sOPSutzODbBj9GVg\nLlwAB56HRIv0Mi425yvTY2Cw2O0gr81ygCCeENCvd+f8Sggv+R7jdzL9zsmh\nvhqsWEiP8HMD2jfFjDgRT9MsIVCtmyIKVfIDAhBRZ6A2QlJmq6VDJB4fXBIN\naNxdwDf2fLlFqCWgkxTHWwutQT29e94liADiVlyEowk4LVIz6wzzvr6gZN4w\nyGxhY9sNnCjnhO7rRsXaZ/WhUptMHrtd9SyQP6Ly1rd+vV2HQOB46idRHyBb\nLAsU\r\n=4e8K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDRSvXdjtHkHmoSNCOfxpxs6Mq4KDKvKC7vcBzNSm7HDAIgSnb0UulIZ3EECBka24q6NinC+13d/pYOP0BvJ29GAi0="}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"aspecto-release-bot","email":"dev@aspecto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-instrumentation-testing-utils_0.0.0-2021-12-22--14-33_1640183789273_0.2545002203469249"},"_hasShrinkwrap":false},"0.0.0-2021-12-26--12-22":{"name":"opentelemetry-instrumentation-testing-utils","version":"0.0.0-2021-12-26--12-22","description":"utils for testing opentelemetry js instrumentation libraries","keywords":["opentelemetry","testing","instrumentation"],"homepage":"https://github.com/aspecto-io/opentelemetry-ext-js#readme","license":"Apache-2.0","main":"dist/src/index.js","repository":{"type":"git","url":"git+https://github.com/aspecto-io/opentelemetry-ext-js.git"},"scripts":{"build":"tsc","prepare":"yarn run build","watch":"tsc -w"},"bugs":{"url":"https://github.com/aspecto-io/opentelemetry-ext-js/issues"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"dependencies":{"@opentelemetry/exporter-jaeger":"^1.0.0","@opentelemetry/instrumentation":"^0.26.0","@opentelemetry/sdk-trace-base":"^1.0.0","@opentelemetry/sdk-trace-node":"^1.0.0"},"devDependencies":{"@opentelemetry/api":"1.0.1","typescript":"4.3.4"},"gitHead":"faef7c8328a9ff8592347e079e5e86d0181d2d5e","readme":"# `instrumentation-testing-utils`\nUtils for testing open-telemetry instrumentation libraries\n\nThis package exports a mocah [root hook plugin](https://mochajs.org/#root-hook-plugins), which is taken care of common tasks that developer need to handle while writing unittests for instrumentations in node.\n\nThis package:\n- Initializes and registering a global trace provider for tests.\n- Registers a global memory exporter which can be referenced in test to access span.\n- Make sure there is only a single instance of an instrumentation class that is used across different `.spec.ts` files so patching is consistent and deterministic.\n- Reset the memory exporter before each test.\n- Optionally - export the test traces to Jaeger for convenience while debugging and developing.\n\nBy using this package, testing instrumentation code can be shorter, and bad practices are more easily avoided.\n\n## Supporter Version\nSince [root hook plugin](https://mochajs.org/#root-hook-plugins) are used, this package is compatible to mocha v8.0.0 and above. \n\n## Usage\n1. Add dev dependency on this package: \n\n```\nyarn add --dev opentelemetry-instrumentation-testing-utils\n```\n2. `require` this package in mocha execution:\n\nAs command line argument option to mocha:\n```js\n    \"scripts\": {\n        \"test\": \"mocha --require opentelemetry-instrumentation-testing-utils\",\n        \"test:jaeger\": \"OTEL_EXPORTER_JAEGER_AGENT_HOST=localhost mocha --require opentelemetry-instrumentation-testing-utils\",\n    },\n```\n\nOr by using config file / package.json config:\n```js\n    \"mocha\": {\n        \"require\": [ \"opentelemetry-instrumentation-mocha\" ]\n    }\n```\n\n3. In your `.spec` file, import `getTestSpans` and `registerInstrumentation` functions and use them to make assertions in the test:\n\n```js\nimport { getTestSpans, registerInstrumentation } from 'opentelemetry-instrumentation-testing-utils';\n\nconst instrumentation = registerInstrumentation(new MyAwesomeInstrumentation());\n\nit('some test', () => {\n    // your code that generate spans for this test\n    const spans: ReadableSpan[] = getTestSpans();\n    // your code doing assertions with the spans array\n});\n```\n\nThat's it - supper short and easy.\n","readmeFilename":"README.md","_id":"opentelemetry-instrumentation-testing-utils@0.0.0-2021-12-26--12-22","_nodeVersion":"12.22.8","_npmVersion":"lerna/3.22.1/node@v12.22.8+x64 (linux)","dist":{"integrity":"sha512-WsutXoq3gI1LjBAZpf7i1Z+fMRz2utFsOmYhrh8X04EUzhoNlKoQc38vAnJjm3EElouuLmpTw0MhPvd8Ys2X9Q==","shasum":"12d2d4ef031b152057e31609b7c5a8bf4cad7943","tarball":"https://registry.npmjs.org/opentelemetry-instrumentation-testing-utils/-/opentelemetry-instrumentation-testing-utils-0.0.0-2021-12-26--12-22.tgz","fileCount":16,"unpackedSize":31552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhyF6uCRA9TVsSAnZWagAACd0P/iutMZhKL9ICspi0bEtn\nS9lEqwMzz1HTKQYyiRe3X/wt5B3smOLO5O+PkeVgFy+NzKmY31Oz2p1m71Ns\nl28CeJFOHCCR34tDeH+Y0ep7u4uLyu9y06QIp8w/bf9V9muTNWDFd2fm+rqy\npOwpF32sawr3SWxZJlMyXWtnuFo7Dx9zzPu1XFMISmMTgajb93JoKR6+zVx8\nCVSBNWDLD7i7xsFhyUwuBGnjV5Ca6mU2/08LZpJnZdn9bRQskSobJ+PXTAYi\n58fgfj5Xq24d8e+m2+OhFTanyBZIVrYG2RHAqUambinE/1uRlrXjMApg87f/\nHW9QP3YW11PL6VBq5jrwzPpKJ2OPzaOEPq+Vn0rnrayFXVBT+dyVcZBIXhat\nxl2GR08BDc7ax9myf8qbVfUh2aZ4zhZKR4nvm86Pr0qHm8BRR8hUmkC+ER0D\n9QrCV8K4OQihIfNBcnUS982kL9ca0SBKo0wnQRKw2iNJzKMxye9pPX2EDjew\npiEYIq5y3vzwbNrUsBmqZb6eawIkly14QnCCtfLu1uaN2pxgdrlg0DXxDT8J\nuftP8nX3CpKAW22/of0GmgIA7k55Z+uDbjj+hYL+OAMYwyGgCClg6xwcnzYH\nazpMObvX5bze9X8mQw0dLK+pLQiPzuZxhcieLDbt/wNxkJQPIT6M1BLjiUHX\n28ff\r\n=uOCU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCVLw+qRQPsx9sPv2Ra+15C6rVF8y0OoA4fLw/pTZs6qQIhAJD+qoUIfKfYFpMkq2T97qAElxtpm0Ut3oBpMIqvhqdr"}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"aspecto-release-bot","email":"dev@aspecto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-instrumentation-testing-utils_0.0.0-2021-12-26--12-22_1640521390721_0.49141130113215414"},"_hasShrinkwrap":false},"0.0.0-2021-12-26--12-31":{"name":"opentelemetry-instrumentation-testing-utils","version":"0.0.0-2021-12-26--12-31","description":"utils for testing opentelemetry js instrumentation libraries","keywords":["opentelemetry","testing","instrumentation"],"homepage":"https://github.com/aspecto-io/opentelemetry-ext-js#readme","license":"Apache-2.0","main":"dist/src/index.js","repository":{"type":"git","url":"git+https://github.com/aspecto-io/opentelemetry-ext-js.git"},"scripts":{"build":"tsc","prepare":"yarn run build","watch":"tsc -w"},"bugs":{"url":"https://github.com/aspecto-io/opentelemetry-ext-js/issues"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"dependencies":{"@opentelemetry/exporter-jaeger":"^1.0.0","@opentelemetry/instrumentation":"^0.26.0","@opentelemetry/sdk-trace-base":"^1.0.0","@opentelemetry/sdk-trace-node":"^1.0.0"},"devDependencies":{"@opentelemetry/api":"1.0.1","typescript":"4.3.4"},"gitHead":"591785317c33cddbfec450849d945af05520a0f4","readme":"# `instrumentation-testing-utils`\nUtils for testing open-telemetry instrumentation libraries\n\nThis package exports a mocah [root hook plugin](https://mochajs.org/#root-hook-plugins), which is taken care of common tasks that developer need to handle while writing unittests for instrumentations in node.\n\nThis package:\n- Initializes and registering a global trace provider for tests.\n- Registers a global memory exporter which can be referenced in test to access span.\n- Make sure there is only a single instance of an instrumentation class that is used across different `.spec.ts` files so patching is consistent and deterministic.\n- Reset the memory exporter before each test.\n- Optionally - export the test traces to Jaeger for convenience while debugging and developing.\n\nBy using this package, testing instrumentation code can be shorter, and bad practices are more easily avoided.\n\n## Supporter Version\nSince [root hook plugin](https://mochajs.org/#root-hook-plugins) are used, this package is compatible to mocha v8.0.0 and above. \n\n## Usage\n1. Add dev dependency on this package: \n\n```\nyarn add --dev opentelemetry-instrumentation-testing-utils\n```\n2. `require` this package in mocha execution:\n\nAs command line argument option to mocha:\n```js\n    \"scripts\": {\n        \"test\": \"mocha --require opentelemetry-instrumentation-testing-utils\",\n        \"test:jaeger\": \"OTEL_EXPORTER_JAEGER_AGENT_HOST=localhost mocha --require opentelemetry-instrumentation-testing-utils\",\n    },\n```\n\nOr by using config file / package.json config:\n```js\n    \"mocha\": {\n        \"require\": [ \"opentelemetry-instrumentation-mocha\" ]\n    }\n```\n\n3. In your `.spec` file, import `getTestSpans` and `registerInstrumentation` functions and use them to make assertions in the test:\n\n```js\nimport { getTestSpans, registerInstrumentation } from 'opentelemetry-instrumentation-testing-utils';\n\nconst instrumentation = registerInstrumentation(new MyAwesomeInstrumentation());\n\nit('some test', () => {\n    // your code that generate spans for this test\n    const spans: ReadableSpan[] = getTestSpans();\n    // your code doing assertions with the spans array\n});\n```\n\nThat's it - supper short and easy.\n","readmeFilename":"README.md","_id":"opentelemetry-instrumentation-testing-utils@0.0.0-2021-12-26--12-31","_nodeVersion":"12.22.8","_npmVersion":"lerna/3.22.1/node@v12.22.8+x64 (linux)","dist":{"integrity":"sha512-AongvHR/m6/VnINdmgMesZL57DGWpsV2sI9eyFnKoHKcUESmcTxfVLnaGyDRaDevBYGQve5CpkLJkNPIFCc5Mw==","shasum":"6bda9b10b18674ba001e19f069a6ffba4b79e500","tarball":"https://registry.npmjs.org/opentelemetry-instrumentation-testing-utils/-/opentelemetry-instrumentation-testing-utils-0.0.0-2021-12-26--12-31.tgz","fileCount":16,"unpackedSize":31552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhyGD7CRA9TVsSAnZWagAA0a8P+QHkHwZTC6goZ2dsS7ew\nPPeWE15hwLjUpKOIlc9R3VD47MeLZgZ1vQTQluYDsbHdIU0S4srYNhc3mYIL\n5WuAlMzdUmJ8Ek12ERMbqMGeSJwpkzu1FJbusbjXnhRZ78VwqsAxb2GmWf+f\nLjAO0ZiFZlnKvpT7ZqED3TcUm7Nni4Q0C6r5goiV0lUIkU8yYCcFkqJi1fNA\nawB7pWSE+FxPKtzYTUNVV3BZgav/MqBNuFzDaXe0bIUoA1RmnaDZZcefcHyJ\n0Xjq6iPi2zrQ+3FDYmt1X9zH8b2ithPTTesw49fMGxmAUdkLKnA4TIjYj1wO\n5CS9ieYYBT7VEAeab3YB8xbmdW7ADGLFCU70Y16w3gFqbTNY4lbffCKR2Jom\nspkvloNrWGGgM7L5jAbq9O6rRESv+D28nkeTucV3wNMPWLDPYWORw8338v+R\n2j7A/ZyV2wMJ/Ga6JXs0Wj5nMsf/zmBDIbhuV7cK2Ws+Z4J2a3d/L9AtCfnq\nUrOyrdOKcoohezWjLL6xq5PE+i5+W1eIUdaR6MclMNaoje3EHEAQQL21u9XU\nkzx+ImrJKj4kAukb0r6/DF+6TlKnYRQP2SPj3/YP4jMIiDa4ckcaGjNjm8/H\nbeW1cfBB4NbhkIBj/oLJWPfDarq+fZbzL+umjUvAozIJuNt0kIVNM48eF3vp\nJYi4\r\n=ku+5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCoeSod3fcm7gxrXNrYdzOUcDj7d8X4V71MCiLrYJBWiQIhAONpBhGpoFghoqooyYP9O5y33Jz/9Y+s6128I9cpkGuG"}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"aspecto-release-bot","email":"dev@aspecto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-instrumentation-testing-utils_0.0.0-2021-12-26--12-31_1640521978877_0.7452762493928384"},"_hasShrinkwrap":false},"0.27.0":{"name":"opentelemetry-instrumentation-testing-utils","version":"0.27.0","description":"utils for testing opentelemetry js instrumentation libraries","keywords":["opentelemetry","testing","instrumentation"],"homepage":"https://github.com/aspecto-io/opentelemetry-ext-js#readme","license":"Apache-2.0","main":"dist/src/index.js","repository":{"type":"git","url":"git+https://github.com/aspecto-io/opentelemetry-ext-js.git"},"scripts":{"build":"tsc","prepare":"yarn run build","watch":"tsc -w"},"bugs":{"url":"https://github.com/aspecto-io/opentelemetry-ext-js/issues"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"dependencies":{"@opentelemetry/exporter-jaeger":"^1.0.1","@opentelemetry/instrumentation":"^0.27.0","@opentelemetry/sdk-trace-base":"^1.0.1","@opentelemetry/sdk-trace-node":"^1.0.1"},"devDependencies":{"@opentelemetry/api":"1.0.1","typescript":"4.3.4"},"gitHead":"687393213037496a1105e522b1bc3110b11bd9c1","_id":"opentelemetry-instrumentation-testing-utils@0.27.0","_nodeVersion":"12.22.8","_npmVersion":"lerna/3.22.1/node@v12.22.8+x64 (linux)","dist":{"integrity":"sha512-hz6ECoJk5vDIEbhfSR3cJzYG5VEW5zo7iRT4SumIYP/Ef1J8I51fBQ21JFpDYdG1Gx10usAqFN4NIWSMubb0vg==","shasum":"f7d29a0c25d8b008524ea7179ce6d8e214746743","tarball":"https://registry.npmjs.org/opentelemetry-instrumentation-testing-utils/-/opentelemetry-instrumentation-testing-utils-0.27.0.tgz","fileCount":16,"unpackedSize":31813,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhyYyHCRA9TVsSAnZWagAAHWUP/jWQoAnN7HxiDP9mfy5c\n6cLsLdBXRyq3ybyUyQVfbreiHpYgNIFSVvpQmoB96f6IgLNOvwjS610WQBer\nMJE5z9OCS0/yLlmhVzZg0tkEOxY1vm9uq3korFps1sB6a1mz033h6Hdciooa\nKzFH4/DlNYfAzKlTPBhdu45sS9KTZ58ESmmpxQvvdw095S+73QfNyzxMqRsq\ntD0+71HA9NfepKyXj3++CsyDhZn/ItHL7V5oyz/o7LANAWBV80Fkrh8z4tVW\nG+jONDlTLBbC5NCem4Q6bfxBPeiTr/R80bMpPxc+Xa2cfq3rEHDE6S07cloG\ngatzedHKmCrQA7qF5DFdDgJt8wFVAZeDn5m4Csu7vrA5rj7kviTQ1oFD+lOn\neHWA6egvl28DRa3994wdvtlTmQqZgNMPlHb1QKem1aOPn3vsA7YFR/U9YMwf\nfw+4jLwBNTrs15KcT5j2y+LZqAx+tp08maQzLYVXPO1yRV9wzBaHofm5zyZj\n/DaUc0T+dwT2p830l8UQgNj+dy/3I2AZCdfWjj+Bt2DKrmI3vy0ivLBswxca\nfwSkTUv+D4hWERlYC/FSLn5EOhkBKduMlo0M2UVm+V80M/8vfVFj9eWpT6q+\nePlnuxDwB1Ux/DB/Hg2dB6ra/2Yg9PVbZV5qADw0J1pee8FrCFj19lxSp+JC\nSFD4\r\n=g7tj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAZoYAljeNehVrWJYzSbVjHw6XGLc+nwmRmsrvJBVAe6AiASl1Ad40IVBQ9d/a1GfK0q85w5G0bTYBYy7Z2KrvBsjw=="}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"aspecto-release-bot","email":"dev@aspecto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-instrumentation-testing-utils_0.27.0_1640598662951_0.39499375318561936"},"_hasShrinkwrap":false}},"time":{"created":"2021-05-31T14:39:54.011Z","0.0.0-2021-05-31--14-38":"2021-05-31T14:39:54.166Z","modified":"2022-05-12T06:43:47.392Z","0.4.1":"2021-06-02T11:41:30.374Z","0.0.0-2021-06-07--07-42":"2021-06-07T07:43:45.052Z","0.0.0-2021-06-09--06-50":"2021-06-09T06:51:09.173Z","0.5.0":"2021-06-09T09:12:36.897Z","0.0.0-2021-06-14--13-06":"2021-06-14T13:07:10.516Z","0.5.1":"2021-06-16T09:20:08.780Z","0.0.0-2021-06-17--13-11":"2021-06-17T13:12:19.877Z","0.21.0":"2021-06-20T10:06:23.322Z","0.0.0-2021-06-23--07-47":"2021-06-23T07:48:55.639Z","0.0.0-2021-06-23--08-12":"2021-06-23T08:13:11.741Z","0.0.0-2021-06-23--15-11":"2021-06-23T15:12:41.096Z","0.22.0":"2021-06-28T08:28:49.369Z","0.22.1":"2021-07-04T14:25:03.704Z","0.23.0":"2021-07-05T09:55:04.474Z","0.0.0-2021-08-01--12-54":"2021-08-01T12:55:27.147Z","0.24.0":"2021-08-01T14:16:43.628Z","0.24.1":"2021-09-01T12:38:25.086Z","0.0.0-2021-09-19--10-26":"2021-09-19T10:27:42.629Z","0.25.0":"2021-09-19T12:44:39.943Z","0.0.0-2021-10-20--09-32":"2021-10-20T09:33:09.679Z","0.26.0":"2021-10-26T19:29:48.065Z","0.0.0-2021-12-15--12-47":"2021-12-15T12:48:52.459Z","0.0.0-2021-12-15--13-05":"2021-12-15T13:07:02.438Z","0.0.0-2021-12-15--13-29":"2021-12-15T13:31:12.624Z","0.0.0-2021-12-15--16-17":"2021-12-15T16:18:30.144Z","0.0.0-2021-12-20--13-41":"2021-12-20T13:42:22.021Z","0.0.0-2021-12-21--15-57":"2021-12-21T15:58:41.761Z","0.0.0-2021-12-22--14-33":"2021-12-22T14:36:29.419Z","0.0.0-2021-12-26--12-22":"2021-12-26T12:23:10.902Z","0.0.0-2021-12-26--12-31":"2021-12-26T12:32:59.062Z","0.27.0":"2021-12-27T09:51:03.088Z"},"maintainers":[{"name":"aspecto-release-bot","email":"dev@aspecto.io"}],"description":"utils for testing opentelemetry js instrumentation libraries","homepage":"https://github.com/aspecto-io/opentelemetry-ext-js#readme","keywords":["opentelemetry","testing","instrumentation"],"repository":{"type":"git","url":"git+https://github.com/aspecto-io/opentelemetry-ext-js.git"},"bugs":{"url":"https://github.com/aspecto-io/opentelemetry-ext-js/issues"},"license":"Apache-2.0","readme":"# `instrumentation-testing-utils`\nUtils for testing open-telemetry instrumentation libraries\n\nThis package exports a mocah [root hook plugin](https://mochajs.org/#root-hook-plugins), which is taken care of common tasks that developer need to handle while writing unittests for instrumentations in node.\n\nThis package:\n- Initializes and registering a global trace provider for tests.\n- Registers a global memory exporter which can be referenced in test to access span.\n- Make sure there is only a single instance of an instrumentation class that is used across different `.spec.ts` files so patching is consistent and deterministic.\n- Reset the memory exporter before each test.\n- Optionally - export the test traces to Jaeger for convenience while debugging and developing.\n\nBy using this package, testing instrumentation code can be shorter, and bad practices are more easily avoided.\n\n## Supporter Version\nSince [root hook plugin](https://mochajs.org/#root-hook-plugins) are used, this package is compatible to mocha v8.0.0 and above. \n\n## Usage\n1. Add dev dependency on this package: \n\n```\nyarn add --dev opentelemetry-instrumentation-testing-utils\n```\n2. `require` this package in mocha execution:\n\nAs command line argument option to mocha:\n```js\n    \"scripts\": {\n        \"test\": \"mocha --require opentelemetry-instrumentation-testing-utils\",\n        \"test:jaeger\": \"OTEL_EXPORTER_JAEGER_AGENT_HOST=localhost mocha --require opentelemetry-instrumentation-testing-utils\",\n    },\n```\n\nOr by using config file / package.json config:\n```js\n    \"mocha\": {\n        \"require\": [ \"opentelemetry-instrumentation-mocha\" ]\n    }\n```\n\n3. In your `.spec` file, import `getTestSpans` and `registerInstrumentation` functions and use them to make assertions in the test:\n\n```js\nimport { getTestSpans, registerInstrumentation } from 'opentelemetry-instrumentation-testing-utils';\n\nconst instrumentation = registerInstrumentation(new MyAwesomeInstrumentation());\n\nit('some test', () => {\n    // your code that generate spans for this test\n    const spans: ReadableSpan[] = getTestSpans();\n    // your code doing assertions with the spans array\n});\n```\n\nThat's it - supper short and easy.\n","readmeFilename":"README.md"}