platforms.spec.tsx 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. import {
  2. getDocsPlatformSDKForPlatform,
  3. getProfilingDocsForPlatform,
  4. } from 'sentry/utils/profiling/platforms';
  5. describe('getDocsPlatformSDKForPlatform', function () {
  6. it.each([
  7. [undefined, null],
  8. ['android', 'android'],
  9. ['apple-macos', null],
  10. ['apple-ios', 'apple-ios'],
  11. ['python', 'python'],
  12. ['python-django', 'python'],
  13. ['python-flask', 'python'],
  14. ['python-fastapi', 'python'],
  15. ['python-starlette', 'python'],
  16. ['python-sanic', 'python'],
  17. ['python-celery', 'python'],
  18. ['python-bottle', 'python'],
  19. ['python-pylons', 'python'],
  20. ['python-pyramid', 'python'],
  21. ['python-tornado', 'python'],
  22. ['python-rq', 'python'],
  23. ['python-awslambda', 'python'],
  24. ['python-azurefunctions', 'python'],
  25. ['python-gcpfunctions', 'python'],
  26. ['node', 'node'],
  27. ['node-express', 'node'],
  28. ['node-koa', 'node'],
  29. ['node-connect', 'node'],
  30. ['node-awslambda', 'node'],
  31. ['node-azurefunctions', 'node'],
  32. ['node-gcpfunctions', 'node'],
  33. ])('gets docs platform for %s', function (platform, docsPlatform) {
  34. expect(getDocsPlatformSDKForPlatform(platform)).toEqual(docsPlatform);
  35. });
  36. });
  37. describe('getProfilingDocsForPlatform', function () {
  38. it.each([
  39. ['android', 'https://docs.sentry.io/platforms/android/profiling/'],
  40. ['apple-macos', null],
  41. ['apple-ios', 'https://docs.sentry.io/platforms/apple/guides/ios/profiling/'],
  42. ['python', 'https://docs.sentry.io/platforms/python/profiling/'],
  43. ['python-django', 'https://docs.sentry.io/platforms/python/profiling/'],
  44. ['python-flask', 'https://docs.sentry.io/platforms/python/profiling/'],
  45. ['python-fastapi', 'https://docs.sentry.io/platforms/python/profiling/'],
  46. ['python-starlette', 'https://docs.sentry.io/platforms/python/profiling/'],
  47. ['python-sanic', 'https://docs.sentry.io/platforms/python/profiling/'],
  48. ['python-celery', 'https://docs.sentry.io/platforms/python/profiling/'],
  49. ['python-bottle', 'https://docs.sentry.io/platforms/python/profiling/'],
  50. ['python-pylons', 'https://docs.sentry.io/platforms/python/profiling/'],
  51. ['python-pyramid', 'https://docs.sentry.io/platforms/python/profiling/'],
  52. ['python-tornado', 'https://docs.sentry.io/platforms/python/profiling/'],
  53. ['python-rq', 'https://docs.sentry.io/platforms/python/profiling/'],
  54. ['python-awslambda', 'https://docs.sentry.io/platforms/python/profiling/'],
  55. ['python-azurefunctions', 'https://docs.sentry.io/platforms/python/profiling/'],
  56. ['python-gcpfunctions', 'https://docs.sentry.io/platforms/python/profiling/'],
  57. ['node', 'https://docs.sentry.io/platforms/node/profiling/'],
  58. ['node-express', 'https://docs.sentry.io/platforms/node/profiling/'],
  59. ['node-koa', 'https://docs.sentry.io/platforms/node/profiling/'],
  60. ['node-connect', 'https://docs.sentry.io/platforms/node/profiling/'],
  61. ['node-awslambda', 'https://docs.sentry.io/platforms/node/profiling/'],
  62. ['node-azurefunctions', 'https://docs.sentry.io/platforms/node/profiling/'],
  63. ['node-gcpfunctions', 'https://docs.sentry.io/platforms/node/profiling/'],
  64. ])('gets profiling docs for %s', function (platform, docs) {
  65. expect(getProfilingDocsForPlatform(platform)).toEqual(docs);
  66. });
  67. });