mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-09-29 22:34:33 +00:00
29 lines
894 B
TypeScript
29 lines
894 B
TypeScript
import {browserKnownDataValues} from 'sentry/components/events/contexts/browser';
|
|
import {getBrowserKnownDataDetails} from 'sentry/components/events/contexts/browser/getBrowserKnownDataDetails';
|
|
|
|
import {browserMockData} from './index.spec';
|
|
|
|
describe('getBrowserKnownDataDetails', function () {
|
|
it('returns values and according to the parameters', function () {
|
|
const allKnownData: ReturnType<typeof getBrowserKnownDataDetails>[] = [];
|
|
|
|
for (const type of Object.keys(browserKnownDataValues)) {
|
|
const deviceKnownData = getBrowserKnownDataDetails({
|
|
type: browserKnownDataValues[type],
|
|
data: browserMockData,
|
|
});
|
|
|
|
if (!deviceKnownData) {
|
|
continue;
|
|
}
|
|
|
|
allKnownData.push(deviceKnownData);
|
|
}
|
|
|
|
expect(allKnownData).toEqual([
|
|
{subject: 'Name', value: ''},
|
|
{subject: 'Version', value: '83.0.4103'},
|
|
]);
|
|
});
|
|
});
|