123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884 |
- import {
- commonTermsDescription,
- desktopTermDescriptions,
- getSessionTermDescription,
- mobileTermsDescription,
- SessionTerm,
- } from 'sentry/views/releases/utils/sessionTerm';
- describe('Release Health Session Term', function () {
- it('dotnet terms', function () {
- // Crashes
- const crashesSessionTerm = getSessionTermDescription(SessionTerm.CRASHES, 'dotnet');
- expect(crashesSessionTerm).toEqual(commonTermsDescription.crashes);
- // Crashed
- const crashedSessionTerm = getSessionTermDescription(SessionTerm.CRASHED, 'dotnet');
- expect(crashedSessionTerm).toEqual(mobileTermsDescription.crashed);
- // Crash Free Users
- const crashFreeUsersSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_USERS,
- 'dotnet'
- );
- expect(crashFreeUsersSessionTerm).toEqual(commonTermsDescription['crash-free-users']);
- // Crash Free Sessions
- const crashFreeSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_SESSIONS,
- 'dotnet'
- );
- expect(crashFreeSessionTerm).toEqual(mobileTermsDescription['crash-free-sessions']);
- // Abnormal
- const abnormalSessionTerm = getSessionTermDescription(SessionTerm.ABNORMAL, 'dotnet');
- expect(abnormalSessionTerm).toEqual(mobileTermsDescription.abnormal);
- // Healthy
- const healthySessionTerm = getSessionTermDescription(SessionTerm.HEALTHY, 'dotnet');
- expect(healthySessionTerm).toEqual(mobileTermsDescription.healthy);
- // Errored
- const erroredSessionTerm = getSessionTermDescription(SessionTerm.ERRORED, 'dotnet');
- expect(erroredSessionTerm).toEqual(mobileTermsDescription.errored);
- // Unhandled
- const unhandledSessionTerm = getSessionTermDescription(
- SessionTerm.UNHANDLED,
- 'dotnet'
- );
- expect(unhandledSessionTerm).toEqual(mobileTermsDescription.unhandled);
- });
- it('java terms', function () {
- // Crashes
- const crashesSessionTerm = getSessionTermDescription(SessionTerm.CRASHES, 'java');
- expect(crashesSessionTerm).toEqual(commonTermsDescription.crashes);
- // Crashed
- const crashedSessionTerm = getSessionTermDescription(SessionTerm.CRASHED, 'java');
- expect(crashedSessionTerm).toEqual(mobileTermsDescription.crashed);
- // Crash Free Users
- const crashFreeUsersSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_USERS,
- 'java'
- );
- expect(crashFreeUsersSessionTerm).toEqual(commonTermsDescription['crash-free-users']);
- // Crash Free Sessions
- const crashFreeSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_SESSIONS,
- 'java'
- );
- expect(crashFreeSessionTerm).toEqual(mobileTermsDescription['crash-free-sessions']);
- // Abnormal
- const abnormalSessionTerm = getSessionTermDescription(SessionTerm.ABNORMAL, 'java');
- expect(abnormalSessionTerm).toEqual(mobileTermsDescription.abnormal);
- // Healthy
- const healthySessionTerm = getSessionTermDescription(SessionTerm.HEALTHY, 'java');
- expect(healthySessionTerm).toEqual(mobileTermsDescription.healthy);
- // Errored
- const erroredSessionTerm = getSessionTermDescription(SessionTerm.ERRORED, 'java');
- expect(erroredSessionTerm).toEqual(mobileTermsDescription.errored);
- // Unhandled
- const unhandledSessionTerm = getSessionTermDescription(SessionTerm.UNHANDLED, 'java');
- expect(unhandledSessionTerm).toEqual(mobileTermsDescription.unhandled);
- });
- it('java-spring terms', function () {
- // Crashes
- const crashesSessionTerm = getSessionTermDescription(
- SessionTerm.CRASHES,
- 'java-spring'
- );
- expect(crashesSessionTerm).toEqual(
- 'A request that resulted in an unhandled exception and hence a Server Error response'
- );
- // Crashed
- const crashedSessionTerm = getSessionTermDescription(
- SessionTerm.CRASHED,
- 'java-spring'
- );
- expect(crashedSessionTerm).toEqual(mobileTermsDescription.crashed);
- // Crash Free Users
- const crashFreeUsersSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_USERS,
- 'java-spring'
- );
- expect(crashFreeUsersSessionTerm).toEqual(commonTermsDescription['crash-free-users']);
- // Crash Free Sessions
- const crashFreeSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_SESSIONS,
- 'java-spring'
- );
- expect(crashFreeSessionTerm).toEqual(mobileTermsDescription['crash-free-sessions']);
- // Abnormal
- const abnormalSessionTerm = getSessionTermDescription(
- SessionTerm.ABNORMAL,
- 'java-spring'
- );
- expect(abnormalSessionTerm).toEqual(mobileTermsDescription.abnormal);
- // Healthy
- const healthySessionTerm = getSessionTermDescription(
- SessionTerm.HEALTHY,
- 'java-spring'
- );
- expect(healthySessionTerm).toEqual(mobileTermsDescription.healthy);
- // Errored
- const erroredSessionTerm = getSessionTermDescription(
- SessionTerm.ERRORED,
- 'java-spring'
- );
- expect(erroredSessionTerm).toEqual(mobileTermsDescription.errored);
- // Unhandled
- const unhandledSessionTerm = getSessionTermDescription(
- SessionTerm.UNHANDLED,
- 'java-spring'
- );
- expect(unhandledSessionTerm).toEqual(mobileTermsDescription.unhandled);
- });
- it('dotnet-aspnetcore terms', function () {
- // Crashes
- const crashesSessionTerm = getSessionTermDescription(
- SessionTerm.CRASHES,
- 'dotnet-aspnetcore'
- );
- expect(crashesSessionTerm).toEqual(
- 'A request that resulted in an unhandled exception and hence a Server Error response'
- );
- // Crashed
- const crashedSessionTerm = getSessionTermDescription(
- SessionTerm.CRASHED,
- 'dotnet-aspnetcore'
- );
- expect(crashedSessionTerm).toEqual(mobileTermsDescription.crashed);
- // Crash Free Users
- const crashFreeUsersSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_USERS,
- 'dotnet-aspnetcore'
- );
- expect(crashFreeUsersSessionTerm).toEqual(commonTermsDescription['crash-free-users']);
- // Crash Free Sessions
- const crashFreeSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_SESSIONS,
- 'dotnet-aspnetcore'
- );
- expect(crashFreeSessionTerm).toEqual(mobileTermsDescription['crash-free-sessions']);
- // Abnormal
- const abnormalSessionTerm = getSessionTermDescription(
- SessionTerm.ABNORMAL,
- 'dotnet-aspnetcore'
- );
- expect(abnormalSessionTerm).toEqual(mobileTermsDescription.abnormal);
- // Healthy
- const healthySessionTerm = getSessionTermDescription(
- SessionTerm.HEALTHY,
- 'dotnet-aspnetcore'
- );
- expect(healthySessionTerm).toEqual(mobileTermsDescription.healthy);
- // Errored
- const erroredSessionTerm = getSessionTermDescription(
- SessionTerm.ERRORED,
- 'dotnet-aspnetcore'
- );
- expect(erroredSessionTerm).toEqual(mobileTermsDescription.errored);
- // Unhandled
- const unhandledSessionTerm = getSessionTermDescription(
- SessionTerm.UNHANDLED,
- 'dotnet-aspnetcore'
- );
- expect(unhandledSessionTerm).toEqual(mobileTermsDescription.unhandled);
- });
- it('android terms', function () {
- // Crashes
- const crashesSessionTerm = getSessionTermDescription(SessionTerm.CRASHES, 'android');
- expect(crashesSessionTerm).toEqual(commonTermsDescription.crashes);
- // Crashed
- const crashedSessionTerm = getSessionTermDescription(SessionTerm.CRASHED, 'android');
- expect(crashedSessionTerm).toEqual(
- 'An unhandled exception that resulted in the application crashing'
- );
- // Crash Free Users
- const crashFreeUsersSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_USERS,
- 'android'
- );
- expect(crashFreeUsersSessionTerm).toEqual(commonTermsDescription['crash-free-users']);
- // Crash Free Sessions
- const crashFreeSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_SESSIONS,
- 'android'
- );
- expect(crashFreeSessionTerm).toEqual(mobileTermsDescription['crash-free-sessions']);
- // Abnormal
- const abnormalSessionTerm = getSessionTermDescription(
- SessionTerm.ABNORMAL,
- 'android'
- );
- expect(abnormalSessionTerm).toEqual(mobileTermsDescription.abnormal);
- // Healthy
- const healthySessionTerm = getSessionTermDescription(SessionTerm.HEALTHY, 'android');
- expect(healthySessionTerm).toEqual(mobileTermsDescription.healthy);
- // Errored
- const erroredSessionTerm = getSessionTermDescription(SessionTerm.ERRORED, 'android');
- expect(erroredSessionTerm).toEqual(mobileTermsDescription.errored);
- // Unhandled
- const unhandledSessionTerm = getSessionTermDescription(
- SessionTerm.UNHANDLED,
- 'android'
- );
- expect(unhandledSessionTerm).toEqual(mobileTermsDescription.unhandled);
- });
- it('cordova terms', function () {
- // Crashes
- const crashesSessionTerm = getSessionTermDescription(SessionTerm.CRASHES, 'cordova');
- expect(crashesSessionTerm).toEqual(commonTermsDescription.crashes);
- // Crashed
- const crashedSessionTerm = getSessionTermDescription(SessionTerm.CRASHED, 'cordova');
- expect(crashedSessionTerm).toEqual(
- 'An unhandled exception that resulted in the application crashing'
- );
- // Crash Free Users
- const crashFreeUsersSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_USERS,
- 'cordova'
- );
- expect(crashFreeUsersSessionTerm).toEqual(commonTermsDescription['crash-free-users']);
- // Crash Free Sessions
- const crashFreeSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_SESSIONS,
- 'cordova'
- );
- expect(crashFreeSessionTerm).toEqual(mobileTermsDescription['crash-free-sessions']);
- // Abnormal
- const abnormalSessionTerm = getSessionTermDescription(
- SessionTerm.ABNORMAL,
- 'cordova'
- );
- expect(abnormalSessionTerm).toEqual(mobileTermsDescription.abnormal);
- // Healthy
- const healthySessionTerm = getSessionTermDescription(SessionTerm.HEALTHY, 'cordova');
- expect(healthySessionTerm).toEqual(mobileTermsDescription.healthy);
- // Errored
- const erroredSessionTerm = getSessionTermDescription(SessionTerm.ERRORED, 'cordova');
- expect(erroredSessionTerm).toEqual(mobileTermsDescription.errored);
- // Unhandled
- const unhandledSessionTerm = getSessionTermDescription(
- SessionTerm.UNHANDLED,
- 'cordova'
- );
- expect(unhandledSessionTerm).toEqual(mobileTermsDescription.unhandled);
- });
- it('react-native terms', function () {
- // Crashes
- const crashesSessionTerm = getSessionTermDescription(
- SessionTerm.CRASHES,
- 'react-native'
- );
- expect(crashesSessionTerm).toEqual(commonTermsDescription.crashes);
- // Crashed
- const crashedSessionTerm = getSessionTermDescription(
- SessionTerm.CRASHED,
- 'react-native'
- );
- expect(crashedSessionTerm).toEqual(
- 'An unhandled exception that resulted in the application crashing'
- );
- // Crash Free Users
- const crashFreeUsersSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_USERS,
- 'react-native'
- );
- expect(crashFreeUsersSessionTerm).toEqual(commonTermsDescription['crash-free-users']);
- // Crash Free Sessions
- const crashFreeSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_SESSIONS,
- 'react-native'
- );
- expect(crashFreeSessionTerm).toEqual(mobileTermsDescription['crash-free-sessions']);
- // Abnormal
- const abnormalSessionTerm = getSessionTermDescription(
- SessionTerm.ABNORMAL,
- 'react-native'
- );
- expect(abnormalSessionTerm).toEqual(mobileTermsDescription.abnormal);
- // Healthy
- const healthySessionTerm = getSessionTermDescription(
- SessionTerm.HEALTHY,
- 'react-native'
- );
- expect(healthySessionTerm).toEqual(mobileTermsDescription.healthy);
- // Errored
- const erroredSessionTerm = getSessionTermDescription(
- SessionTerm.ERRORED,
- 'react-native'
- );
- expect(erroredSessionTerm).toEqual(mobileTermsDescription.errored);
- // Unhandled
- const unhandledSessionTerm = getSessionTermDescription(
- SessionTerm.UNHANDLED,
- 'react-native'
- );
- expect(unhandledSessionTerm).toEqual(mobileTermsDescription.unhandled);
- });
- it('flutter terms', function () {
- // Crashes
- const crashesSessionTerm = getSessionTermDescription(SessionTerm.CRASHES, 'flutter');
- expect(crashesSessionTerm).toEqual(commonTermsDescription.crashes);
- // Crashed
- const crashedSessionTerm = getSessionTermDescription(SessionTerm.CRASHED, 'flutter');
- expect(crashedSessionTerm).toEqual(
- 'An unhandled exception that resulted in the application crashing'
- );
- // Crash Free Users
- const crashFreeUsersSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_USERS,
- 'flutter'
- );
- expect(crashFreeUsersSessionTerm).toEqual(commonTermsDescription['crash-free-users']);
- // Crash Free Sessions
- const crashFreeSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_SESSIONS,
- 'flutter'
- );
- expect(crashFreeSessionTerm).toEqual(mobileTermsDescription['crash-free-sessions']);
- // Abnormal
- const abnormalSessionTerm = getSessionTermDescription(
- SessionTerm.ABNORMAL,
- 'flutter'
- );
- expect(abnormalSessionTerm).toEqual(mobileTermsDescription.abnormal);
- // Healthy
- const healthySessionTerm = getSessionTermDescription(SessionTerm.HEALTHY, 'flutter');
- expect(healthySessionTerm).toEqual(mobileTermsDescription.healthy);
- // Errored
- const erroredSessionTerm = getSessionTermDescription(SessionTerm.ERRORED, 'flutter');
- expect(erroredSessionTerm).toEqual(mobileTermsDescription.errored);
- // Unhandled
- const unhandledSessionTerm = getSessionTermDescription(
- SessionTerm.UNHANDLED,
- 'flutter'
- );
- expect(unhandledSessionTerm).toEqual(mobileTermsDescription.unhandled);
- });
- it('apple terms', function () {
- // Crashes
- const crashesSessionTerm = getSessionTermDescription(
- SessionTerm.CRASHES,
- 'apple-macos'
- );
- expect(crashesSessionTerm).toEqual(commonTermsDescription.crashes);
- // Crashed
- const crashedSessionTerm = getSessionTermDescription(
- SessionTerm.CRASHED,
- 'apple-macos'
- );
- expect(crashedSessionTerm).toEqual(
- 'An error that resulted in the application crashing'
- );
- // Crash Free Users
- const crashFreeUsersSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_USERS,
- 'apple-macos'
- );
- expect(crashFreeUsersSessionTerm).toEqual(commonTermsDescription['crash-free-users']);
- // Crash Free Sessions
- const crashFreeSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_SESSIONS,
- 'apple-macos'
- );
- expect(crashFreeSessionTerm).toEqual(mobileTermsDescription['crash-free-sessions']);
- // Abnormal
- const abnormalSessionTerm = getSessionTermDescription(
- SessionTerm.ABNORMAL,
- 'apple-macos'
- );
- expect(abnormalSessionTerm).toEqual(mobileTermsDescription.abnormal);
- // Healthy
- const healthySessionTerm = getSessionTermDescription(
- SessionTerm.HEALTHY,
- 'apple-macos'
- );
- expect(healthySessionTerm).toEqual(mobileTermsDescription.healthy);
- // Errored
- const erroredSessionTerm = getSessionTermDescription(
- SessionTerm.ERRORED,
- 'apple-macos'
- );
- expect(erroredSessionTerm).toEqual(mobileTermsDescription.errored);
- // Unhandled
- const unhandledSessionTerm = getSessionTermDescription(
- SessionTerm.UNHANDLED,
- 'apple-macos'
- );
- expect(unhandledSessionTerm).toEqual(mobileTermsDescription.unhandled);
- });
- it('node-express terms', function () {
- // Crashes
- const crashesSessionTerm = getSessionTermDescription(
- SessionTerm.CRASHES,
- 'node-express'
- );
- expect(crashesSessionTerm).toEqual(commonTermsDescription.crashes);
- // Crashed
- const crashedSessionTerm = getSessionTermDescription(
- SessionTerm.CRASHED,
- 'node-express'
- );
- expect(crashedSessionTerm).toEqual(
- 'During the session an unhandled global error/promise rejection occurred.'
- );
- // Crash Free Users
- const crashFreeUsersSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_USERS,
- 'node-express'
- );
- expect(crashFreeUsersSessionTerm).toEqual(commonTermsDescription['crash-free-users']);
- // Crash Free Sessions
- const crashFreeSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_SESSIONS,
- 'node-express'
- );
- expect(crashFreeSessionTerm).toEqual(commonTermsDescription['crash-free-sessions']);
- // Abnormal
- const abnormalSessionTerm = getSessionTermDescription(
- SessionTerm.ABNORMAL,
- 'node-express'
- );
- expect(abnormalSessionTerm).toEqual('Non applicable for Javascript.');
- // Healthy
- const healthySessionTerm = getSessionTermDescription(
- SessionTerm.HEALTHY,
- 'node-express'
- );
- expect(healthySessionTerm).toEqual(
- 'No errors were captured during session life-time.'
- );
- // Errored
- const erroredSessionTerm = getSessionTermDescription(
- SessionTerm.ERRORED,
- 'node-express'
- );
- expect(erroredSessionTerm).toEqual(
- 'During the session at least one handled error occurred.'
- );
- // Unhandled
- const unhandledSessionTerm = getSessionTermDescription(
- SessionTerm.UNHANDLED,
- 'node-express'
- );
- expect(unhandledSessionTerm).toEqual(
- "An error was captured by the global 'onerror' or 'onunhandledrejection' handler."
- );
- });
- it('javascript terms', function () {
- // Crashes
- const crashesSessionTerm = getSessionTermDescription(
- SessionTerm.CRASHES,
- 'javascript'
- );
- expect(crashesSessionTerm).toEqual(commonTermsDescription.crashes);
- // Crashed
- const crashedSessionTerm = getSessionTermDescription(
- SessionTerm.CRASHED,
- 'javascript'
- );
- expect(crashedSessionTerm).toEqual(
- 'During the session an unhandled global error/promise rejection occurred.'
- );
- // Crash Free Users
- const crashFreeUsersSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_USERS,
- 'javascript'
- );
- expect(crashFreeUsersSessionTerm).toEqual(commonTermsDescription['crash-free-users']);
- // Crash Free Sessions
- const crashFreeSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_SESSIONS,
- 'javascript'
- );
- expect(crashFreeSessionTerm).toEqual(commonTermsDescription['crash-free-sessions']);
- // Abnormal
- const abnormalSessionTerm = getSessionTermDescription(
- SessionTerm.ABNORMAL,
- 'javascript'
- );
- expect(abnormalSessionTerm).toEqual('Non applicable for Javascript.');
- // Healthy
- const healthySessionTerm = getSessionTermDescription(
- SessionTerm.HEALTHY,
- 'javascript'
- );
- expect(healthySessionTerm).toEqual(
- 'No errors were captured during session life-time.'
- );
- // Errored
- const erroredSessionTerm = getSessionTermDescription(
- SessionTerm.ERRORED,
- 'javascript'
- );
- expect(erroredSessionTerm).toEqual(
- 'During the session at least one handled error occurred.'
- );
- // Unhandled
- const unhandledSessionTerm = getSessionTermDescription(
- SessionTerm.UNHANDLED,
- 'javascript'
- );
- expect(unhandledSessionTerm).toEqual(
- "An error was captured by the global 'onerror' or 'onunhandledrejection' handler."
- );
- });
- it('rust terms', function () {
- // Crashes
- const crashesSessionTerm = getSessionTermDescription(SessionTerm.CRASHES, 'rust');
- expect(crashesSessionTerm).toEqual(commonTermsDescription.crashes);
- // Crashed
- const crashedSessionTerm = getSessionTermDescription(SessionTerm.CRASHED, 'rust');
- expect(crashedSessionTerm).toEqual(
- 'The application had an unrecoverable error (a panic)'
- );
- // Crash Free Users
- const crashFreeUsersSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_USERS,
- 'rust'
- );
- expect(crashFreeUsersSessionTerm).toEqual(commonTermsDescription['crash-free-users']);
- // Crash Free Sessions
- const crashFreeSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_SESSIONS,
- 'rust'
- );
- expect(crashFreeSessionTerm).toEqual(commonTermsDescription['crash-free-sessions']);
- // Abnormal
- const abnormalSessionTerm = getSessionTermDescription(SessionTerm.ABNORMAL, 'rust');
- expect(abnormalSessionTerm).toEqual(desktopTermDescriptions.abnormal);
- // Healthy
- const healthySessionTerm = getSessionTermDescription(SessionTerm.HEALTHY, 'rust');
- expect(healthySessionTerm).toEqual(desktopTermDescriptions.healthy);
- // Errored
- const erroredSessionTerm = getSessionTermDescription(SessionTerm.ERRORED, 'rust');
- expect(erroredSessionTerm).toEqual(desktopTermDescriptions.errored);
- // Unhandled
- const unhandledSessionTerm = getSessionTermDescription(SessionTerm.UNHANDLED, 'rust');
- expect(unhandledSessionTerm).toEqual(desktopTermDescriptions.unhandled);
- });
- it('apple-ios terms', function () {
- // Crashes
- const crashesSessionTerm = getSessionTermDescription(
- SessionTerm.CRASHES,
- 'apple-ios'
- );
- expect(crashesSessionTerm).toEqual(commonTermsDescription.crashes);
- // Crashed
- const crashedSessionTerm = getSessionTermDescription(
- SessionTerm.CRASHED,
- 'apple-ios'
- );
- expect(crashedSessionTerm).toEqual(desktopTermDescriptions.crashed);
- // Crash Free Users
- const crashFreeUsersSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_USERS,
- 'apple-ios'
- );
- expect(crashFreeUsersSessionTerm).toEqual(commonTermsDescription['crash-free-users']);
- // Crash Free Sessions
- const crashFreeSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_SESSIONS,
- 'apple-ios'
- );
- expect(crashFreeSessionTerm).toEqual(commonTermsDescription['crash-free-sessions']);
- // Abnormal
- const abnormalSessionTerm = getSessionTermDescription(
- SessionTerm.ABNORMAL,
- 'apple-ios'
- );
- expect(abnormalSessionTerm).toEqual(desktopTermDescriptions.abnormal);
- // Healthy
- const healthySessionTerm = getSessionTermDescription(
- SessionTerm.HEALTHY,
- 'apple-ios'
- );
- expect(healthySessionTerm).toEqual(desktopTermDescriptions.healthy);
- // Errored
- const erroredSessionTerm = getSessionTermDescription(
- SessionTerm.ERRORED,
- 'apple-ios'
- );
- expect(erroredSessionTerm).toEqual(desktopTermDescriptions.errored);
- // Unhandled
- const unhandledSessionTerm = getSessionTermDescription(
- SessionTerm.UNHANDLED,
- 'apple-ios'
- );
- expect(unhandledSessionTerm).toEqual(desktopTermDescriptions.unhandled);
- });
- it('minidump terms', function () {
- // Crashes
- const crashesSessionTerm = getSessionTermDescription(SessionTerm.CRASHES, 'minidump');
- expect(crashesSessionTerm).toEqual(commonTermsDescription.crashes);
- // Crashed
- const crashedSessionTerm = getSessionTermDescription(SessionTerm.CRASHED, 'minidump');
- expect(crashedSessionTerm).toEqual(desktopTermDescriptions.crashed);
- // Crash Free Users
- const crashFreeUsersSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_USERS,
- 'minidump'
- );
- expect(crashFreeUsersSessionTerm).toEqual(commonTermsDescription['crash-free-users']);
- // Crash Free Sessions
- const crashFreeSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_SESSIONS,
- 'minidump'
- );
- expect(crashFreeSessionTerm).toEqual(commonTermsDescription['crash-free-sessions']);
- // Abnormal
- const abnormalSessionTerm = getSessionTermDescription(
- SessionTerm.ABNORMAL,
- 'minidump'
- );
- expect(abnormalSessionTerm).toEqual(desktopTermDescriptions.abnormal);
- // Healthy
- const healthySessionTerm = getSessionTermDescription(SessionTerm.HEALTHY, 'minidump');
- expect(healthySessionTerm).toEqual(desktopTermDescriptions.healthy);
- // Errored
- const erroredSessionTerm = getSessionTermDescription(SessionTerm.ERRORED, 'minidump');
- expect(erroredSessionTerm).toEqual(desktopTermDescriptions.errored);
- // Unhandled
- const unhandledSessionTerm = getSessionTermDescription(
- SessionTerm.UNHANDLED,
- 'minidump'
- );
- expect(unhandledSessionTerm).toEqual(desktopTermDescriptions.unhandled);
- });
- it('native terms', function () {
- // Crashes
- const crashesSessionTerm = getSessionTermDescription(SessionTerm.CRASHES, 'native');
- expect(crashesSessionTerm).toEqual(commonTermsDescription.crashes);
- // Crashed
- const crashedSessionTerm = getSessionTermDescription(SessionTerm.CRASHED, 'native');
- expect(crashedSessionTerm).toEqual(desktopTermDescriptions.crashed);
- // Crash Free Users
- const crashFreeUsersSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_USERS,
- 'native'
- );
- expect(crashFreeUsersSessionTerm).toEqual(commonTermsDescription['crash-free-users']);
- // Crash Free Sessions
- const crashFreeSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_SESSIONS,
- 'native'
- );
- expect(crashFreeSessionTerm).toEqual(commonTermsDescription['crash-free-sessions']);
- // Abnormal
- const abnormalSessionTerm = getSessionTermDescription(SessionTerm.ABNORMAL, 'native');
- expect(abnormalSessionTerm).toEqual(desktopTermDescriptions.abnormal);
- // Healthy
- const healthySessionTerm = getSessionTermDescription(SessionTerm.HEALTHY, 'native');
- expect(healthySessionTerm).toEqual(desktopTermDescriptions.healthy);
- // Errored
- const erroredSessionTerm = getSessionTermDescription(SessionTerm.ERRORED, 'native');
- expect(erroredSessionTerm).toEqual(desktopTermDescriptions.errored);
- // Unhandled
- const unhandledSessionTerm = getSessionTermDescription(
- SessionTerm.UNHANDLED,
- 'native'
- );
- expect(unhandledSessionTerm).toEqual(desktopTermDescriptions.unhandled);
- });
- it('python terms', function () {
- // Crashes
- const crashesSessionTerm = getSessionTermDescription(SessionTerm.CRASHES, 'python');
- expect(crashesSessionTerm).toEqual(commonTermsDescription.crashes);
- // Crashed
- const crashedSessionTerm = getSessionTermDescription(SessionTerm.CRASHED, 'python');
- expect(crashedSessionTerm).toEqual(
- 'Number of users who experienced an unhandled error'
- );
- // Crash Free Users
- const crashFreeUsersSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_USERS,
- 'python'
- );
- expect(crashFreeUsersSessionTerm).toEqual(commonTermsDescription['crash-free-users']);
- // Crash Free Sessions
- const crashFreeSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_SESSIONS,
- 'python'
- );
- expect(crashFreeSessionTerm).toEqual(commonTermsDescription['crash-free-sessions']);
- // Abnormal
- const abnormalSessionTerm = getSessionTermDescription(SessionTerm.ABNORMAL, 'python');
- expect(abnormalSessionTerm).toEqual('An unknown session exit');
- // Healthy
- const healthySessionTerm = getSessionTermDescription(SessionTerm.HEALTHY, 'python');
- expect(healthySessionTerm).toEqual(mobileTermsDescription.healthy);
- // Errored
- const erroredSessionTerm = getSessionTermDescription(SessionTerm.ERRORED, 'python');
- expect(erroredSessionTerm).toEqual(mobileTermsDescription.errored);
- // Unhandled
- const unhandledSessionTerm = getSessionTermDescription(
- SessionTerm.UNHANDLED,
- 'python'
- );
- expect(unhandledSessionTerm).toEqual(mobileTermsDescription.unhandled);
- });
- it('default terms', function () {
- // Crashes
- const crashesSessionTerm = getSessionTermDescription(SessionTerm.CRASHES, null);
- expect(crashesSessionTerm).toEqual(commonTermsDescription.crashes);
- // Crashed
- const crashedSessionTerm = getSessionTermDescription(SessionTerm.CRASHED, null);
- expect(crashedSessionTerm).toEqual(
- 'Number of users who experienced an unhandled error'
- );
- // Crash Free Users
- const crashFreeUsersSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_USERS,
- null
- );
- expect(crashFreeUsersSessionTerm).toEqual(commonTermsDescription['crash-free-users']);
- // Crash Free Sessions
- const crashFreeSessionTerm = getSessionTermDescription(
- SessionTerm.CRASH_FREE_SESSIONS,
- null
- );
- expect(crashFreeSessionTerm).toEqual(commonTermsDescription['crash-free-sessions']);
- // Abnormal
- const abnormalSessionTerm = getSessionTermDescription(SessionTerm.ABNORMAL, null);
- expect(abnormalSessionTerm).toEqual('An unknown session exit');
- // Healthy
- const healthySessionTerm = getSessionTermDescription(SessionTerm.HEALTHY, null);
- expect(healthySessionTerm).toEqual(mobileTermsDescription.healthy);
- // Errored
- const erroredSessionTerm = getSessionTermDescription(SessionTerm.ERRORED, null);
- expect(erroredSessionTerm).toEqual(mobileTermsDescription.errored);
- // Unhandled
- const unhandledSessionTerm = getSessionTermDescription(SessionTerm.UNHANDLED, null);
- expect(unhandledSessionTerm).toEqual(mobileTermsDescription.unhandled);
- });
- });
|