Skip to content

Commit

Permalink
chore(test): adjust test to pass in Safari browser (#3645)
Browse files Browse the repository at this point in the history
In Safari stringified Proxy object has ProxyObject as a name, but in other browsers it does not.

Enabled Safari tests on BrowserStack to prevent future regressions.
  • Loading branch information
devoto13 committed Feb 2, 2021
1 parent 7cdb43e commit a14a24e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
12 changes: 6 additions & 6 deletions test/client/karma.conf.js
Expand Up @@ -15,12 +15,12 @@ const launchers = {
os: 'Windows',
os_version: '10'
},
// bs_safari: {
// base: 'BrowserStack',
// browser: 'Safari',
// os: 'OS X',
// os_version: 'Big Sur'
// },
bs_safari: {
base: 'BrowserStack',
browser: 'Safari',
os: 'OS X',
os_version: 'Big Sur'
},
bs_ie: {
base: 'BrowserStack',
browser: 'IE',
Expand Down
4 changes: 3 additions & 1 deletion test/client/stringify.spec.js
Expand Up @@ -49,7 +49,9 @@ describe('stringify', function () {
if (window.Proxy) {
it('should serialize proxied functions', function () {
var defProxy = new Proxy(function (d, e, f) { return 'whatever' }, {})
assert.deepStrictEqual(stringify(defProxy), 'function () { ... }')
// In Safari stringified Proxy object has ProxyObject as a name, but
// in other browsers it does not.
assert.deepStrictEqual(/^function (ProxyObject)?\(\) { ... }$/.test(stringify(defProxy)), true)
})
}

Expand Down

0 comments on commit a14a24e

Please sign in to comment.