Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dep): Bump useragent to fix HeadlessChrome version #3201

Merged
merged 1 commit into from Nov 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -395,7 +395,7 @@
"socket.io": "2.1.1",
"source-map": "^0.6.1",
"tmp": "0.0.33",
"useragent": "2.2.1"
"useragent": "2.3.0"
},
"devDependencies": {
"LiveScript": "^1.3.0",
Expand Down
16 changes: 12 additions & 4 deletions test/unit/helper.spec.js
Expand Up @@ -75,31 +75,31 @@ describe('helper', () => {
'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; ' +
'.NET CLR 2.0.50727; .NET4.0C; .NET4.0E)'
)
.to.be.equal('IE 7.0.0 (Windows Vista 0.0.0)')
.to.be.equal('IE 7.0.0 (Windows Vista.0.0)')
})

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

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

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

it('should parse PhantomJS', () => {
Expand All @@ -118,6 +118,14 @@ describe('helper', () => {
)
.to.be.equal('Android 4.2.0 (Android 4.2.0)')
})

it('should parse Headless Chrome', () => {
expecting(
'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) ' +
'HeadlessChrome/70.0.3538.77 Safari/537.36'
)
.to.be.equal('HeadlessChrome 70.0.3538 (Linux 0.0.0)')
})
})

describe('isDefined', () => {
Expand Down