Fixed tests

This commit is contained in:
Alejandro Celaya 2022-12-23 21:16:17 +01:00
parent 05553ba18a
commit e518b94fba

View file

@ -7,6 +7,7 @@ describe('VisitsParser', () => {
Mock.of<Visit>({ Mock.of<Visit>({
userAgent: 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0', userAgent: 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0',
referer: 'https://google.com', referer: 'https://google.com',
potentialBot: false,
visitLocation: { visitLocation: {
countryName: 'Spain', countryName: 'Spain',
cityName: 'Zaragoza', cityName: 'Zaragoza',
@ -17,6 +18,7 @@ describe('VisitsParser', () => {
Mock.of<Visit>({ Mock.of<Visit>({
userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:42.0) Gecko/20100101 Firefox/42.0', userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:42.0) Gecko/20100101 Firefox/42.0',
referer: 'https://google.com', referer: 'https://google.com',
potentialBot: false,
visitLocation: { visitLocation: {
countryName: 'United States', countryName: 'United States',
cityName: 'New York', cityName: 'New York',
@ -26,6 +28,7 @@ describe('VisitsParser', () => {
}), }),
Mock.of<Visit>({ Mock.of<Visit>({
userAgent: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36', userAgent: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36',
potentialBot: false,
visitLocation: { visitLocation: {
countryName: 'Spain', countryName: 'Spain',
cityName: '', cityName: '',
@ -34,6 +37,7 @@ describe('VisitsParser', () => {
Mock.of<Visit>({ Mock.of<Visit>({
userAgent: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36', userAgent: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36',
referer: 'https://m.facebook.com', referer: 'https://m.facebook.com',
potentialBot: false,
visitLocation: { visitLocation: {
countryName: 'Spain', countryName: 'Spain',
cityName: 'Zaragoza', cityName: 'Zaragoza',
@ -52,6 +56,7 @@ describe('VisitsParser', () => {
visitedUrl: 'foo', visitedUrl: 'foo',
userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:42.0) Gecko/20100101 Firefox/42.0', userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:42.0) Gecko/20100101 Firefox/42.0',
referer: 'https://google.com', referer: 'https://google.com',
potentialBot: false,
visitLocation: { visitLocation: {
countryName: 'United States', countryName: 'United States',
cityName: 'New York', cityName: 'New York',