Skip to content

Commit

Permalink
[instrumentation-fetch] Use msw for fetch instrumentation tests (#5282
Browse files Browse the repository at this point in the history
)

Co-authored-by: Marc Pichler <[email protected]>
  • Loading branch information
chancancode and pichlermarc authored Jan 30, 2025
1 parent 3c040c4 commit 27bdf71
Show file tree
Hide file tree
Showing 5 changed files with 2,885 additions and 995 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ const karmaBaseConfig = require('../../../karma.base');

module.exports = (config) => {
config.set(Object.assign({}, karmaBaseConfig, {
webpack: karmaWebpackConfig
proxies: {
'/mockServiceWorker.js': '/base/test/mockServiceWorker.js',
},
files: [...karmaBaseConfig.files, 'test/mockServiceWorker.js'],
webpack: karmaWebpackConfig,
}))
};
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"karma-webpack": "5.0.1",
"lerna": "6.6.2",
"mocha": "10.8.2",
"msw": "^2.7.0",
"nyc": "17.1.0",
"sinon": "15.1.2",
"ts-loader": "9.5.2",
Expand All @@ -92,5 +93,10 @@
"@opentelemetry/semantic-conventions": "1.28.0"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation-fetch",
"sideEffects": false
"sideEffects": false,
"msw": {
"workerDirectory": [
"test"
]
}
}
Loading

0 comments on commit 27bdf71

Please sign in to comment.