plone / mockup

A collection of client side patterns for faster and easier web development
http://plone.github.io/mockup/
BSD 3-Clause "New" or "Revised" License
47 stars 93 forks source link

Sinon test stub (structure pattern) fails for window.history in Chrome (``make test-dev``) #687

Open seanupton opened 8 years ago

seanupton commented 8 years ago

I get this when running make test-dev in attempting to stub (sinon) window['history']:

Chrome 51.0.2704 (Mac OS X 10.11.4) Structure "before each" hook for "initialize" FAILED TypeError: Cannot assign to read only property 'history' of object '#<Window>' at Object.stub (/Users/sean/projects/mockup/mockup/bower_components/sinonjs/sinon.js:4146:42)

It appears Chrome (while permitting me to set window['history']) errors as above when sinon.stub attempts this:

https://github.com/plone/mockup/blob/master/mockup/tests/pattern-structure-test.js#L842

I see this with latest mockup master (as of 11ade25ca55d23eb62a3ce67c3f8193eb4f62857), running on El Capitan and karma running Chrome 51.0.2704.84 (64-bit).

I see no such problems testing using make test.

seanupton commented 8 years ago

@vangheem @thet do you all see same thing when running make test-dev?

vangheem commented 8 years ago

@seanupton no, I don't actually.