Skip to content

Commit

Permalink
chore(test): adjust test to pass in Safari browser (karma-runner#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 authored and anthony-redFox committed May 5, 2023
1 parent 6051a2e commit 9ac99bb
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 9ac99bb

Please sign in to comment.