Skip to content

Commit bb05390

Browse files
committed
tests fix pt.1
1 parent 4050a25 commit bb05390

File tree

2 files changed

+7
-30
lines changed

2 files changed

+7
-30
lines changed

src/parser-browsers.js

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -133,19 +133,10 @@ const browsersList = [
133133
/* MetaWebCrawler */
134134
{
135135
test: [/facebookexternalhit/i, /facebookcatalog/i],
136-
describe(ua) {
137-
const browser = {
136+
describe() {
137+
return {
138138
name: 'MetaWebCrawler',
139139
};
140-
const version = Utils.getFirstMatch(/facebookexternalhit\/(\d+(\.\d+)+)/i, ua)
141-
|| Utils.getFirstMatch(/facebookcatalog\/(\d+(\.\d+)+)/i, ua)
142-
|| Utils.getFirstMatch(commonVersionIdentifier, ua);
143-
144-
if (version) {
145-
browser.version = version;
146-
}
147-
148-
return browser;
149140
},
150141
},
151142

@@ -162,34 +153,20 @@ const browsersList = [
162153
/* YandexBot */
163154
{
164155
test: [/yandexbot/i, /yandexmobilebot/i],
165-
describe(ua) {
166-
const browser = {
156+
describe() {
157+
return {
167158
name: 'YandexBot',
168159
};
169-
const version = Utils.getFirstMatch(/yandex(?:bot|mobilebot)\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
170-
171-
if (version) {
172-
browser.version = version;
173-
}
174-
175-
return browser;
176160
},
177161
},
178162

179163
/* PingdomBot */
180164
{
181165
test: [/pingdom/i],
182-
describe(ua) {
183-
const browser = {
166+
describe() {
167+
return {
184168
name: 'PingdomBot',
185169
};
186-
const version = Utils.getFirstMatch(/version[_/](\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(/pingdom\.com_bot_.*?(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
187-
188-
if (version) {
189-
browser.version = version;
190-
}
191-
192-
return browser;
193170
},
194171
},
195172

test/acceptance/useragentstrings.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2618,7 +2618,7 @@
26182618
os: {}
26192619
platform:
26202620
type: "bot"
2621-
vendor: "InternetArchive"
2621+
vendor: "Internet Archive"
26222622
engine: {}
26232623
MetaWebCrawler:
26242624
-

0 commit comments

Comments
 (0)