Skip to content

Commit 240209f

Browse files
rkuzsmajohnjbarton
authored andcommittedNov 5, 2018
fix(dep): Bump useragent to fix HeadlessChrome version (#3201)
Fixes #2762
1 parent 361aa3f commit 240209f

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed
 

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@
395395
"socket.io": "2.1.1",
396396
"source-map": "^0.6.1",
397397
"tmp": "0.0.33",
398-
"useragent": "2.2.1"
398+
"useragent": "2.3.0"
399399
},
400400
"devDependencies": {
401401
"LiveScript": "^1.3.0",

‎test/unit/helper.spec.js

+12-4
Original file line numberDiff line numberDiff line change
@@ -75,31 +75,31 @@ describe('helper', () => {
7575
'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; ' +
7676
'.NET CLR 2.0.50727; .NET4.0C; .NET4.0E)'
7777
)
78-
.to.be.equal('IE 7.0.0 (Windows Vista 0.0.0)')
78+
.to.be.equal('IE 7.0.0 (Windows Vista.0.0)')
7979
})
8080

8181
it('should parse IE8', () => {
8282
expecting(
8383
'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; ' +
8484
'SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; InfoPath.3)"'
8585
)
86-
.to.be.equal('IE 8.0.0 (Windows 7 0.0.0)')
86+
.to.be.equal('IE 8.0.0 (Windows 7.0.0)')
8787
})
8888

8989
it('should parse IE9', () => {
9090
expecting(
9191
'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0; ' +
9292
'.NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)'
9393
)
94-
.to.be.equal('IE 9.0.0 (Windows 7 0.0.0)')
94+
.to.be.equal('IE 9.0.0 (Windows 7.0.0)')
9595
})
9696

9797
it('should parse IE10', () => {
9898
expecting(
9999
'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0; ' +
100100
'.NET4.0E; .NET4.0C)'
101101
)
102-
.to.be.equal('IE 10.0.0 (Windows 8 0.0.0)')
102+
.to.be.equal('IE 10.0.0 (Windows 8.0.0)')
103103
})
104104

105105
it('should parse PhantomJS', () => {
@@ -118,6 +118,14 @@ describe('helper', () => {
118118
)
119119
.to.be.equal('Android 4.2.0 (Android 4.2.0)')
120120
})
121+
122+
it('should parse Headless Chrome', () => {
123+
expecting(
124+
'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) ' +
125+
'HeadlessChrome/70.0.3538.77 Safari/537.36'
126+
)
127+
.to.be.equal('HeadlessChrome 70.0.3538 (Linux 0.0.0)')
128+
})
121129
})
122130

123131
describe('isDefined', () => {

0 commit comments

Comments
 (0)
Please sign in to comment.