Skip to content
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.

Commit

Permalink
Fix capabilities test set comparison bug.
Browse files Browse the repository at this point in the history
Chai assert.deepEquals always passes for sets and maps (chaijs/deep-eql#4).
  • Loading branch information
aomarks committed May 22, 2017
1 parent 2b58b75 commit 52da3bb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/test/capabilities_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ import * as capabilities from '../capabilities';

function assertBrowserCapabilities(
userAgent: string, expect: capabilities.BrowserCapability[]) {
assert.deepEqual(
capabilities.browserCapabilities(userAgent), new Set(expect));
assert.sameMembers([...capabilities.browserCapabilities(userAgent)], expect);
}

suite('capabilities', function() {
Expand All @@ -44,10 +43,10 @@ suite('capabilities', function() {
test('safari push capability is predicated on macOS version', () => {
assertBrowserCapabilities(
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.1 Safari/603.1.30',
['push']);
['es2015']);
assertBrowserCapabilities(
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.1 Safari/603.1.30',
['push']);
['es2015', 'push']);
});

test('parseVersion parses with fallback to -1', () => {
Expand Down

0 comments on commit 52da3bb

Please sign in to comment.