dfahlander / typeson-registry

The type registry for typeson

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Some browser-tests fails

dfahlander opened this issue · comments

Running browser-tests in chrome:

  • The two FileList tests fails:
should get back a FileList instance with the original data ‣
TypeError: Failed to set the 'files' property on 'HTMLInputElement': The provided value is not of type 'FileList'.
    at Context.<anonymous> (http://localhost:8080/test/test.js:656:21)
should get back a FileList instance with the original data asynchronously ‣
TypeError: Failed to set the 'files' property on 'HTMLInputElement': The provided value is not of type 'FileList'.
    at Context.<anonymous> (http://localhost:8080/test/test.js:696:21)

Running in Firefox:

  • FileList tests fails
  • IntlType tests fails:
should return a Intl.Collator
‣

AssertionError: expected 'en' to deeply equal 'en-u-co-search'AssertionError@http://localhost:8080/node_modules/chai/chai.js:9199:13
[3]</module.exports/Assertion.prototype.assert@http://localhost:8080/node_modules/chai/chai.js:239:13
assertEql@http://localhost:8080/node_modules/chai/chai.js:1372:5
methodWrapper@http://localhost:8080/node_modules/chai/chai.js:7587:18
assertEqual@http://localhost:8080/node_modules/chai/chai.js:1312:14
methodWrapper@http://localhost:8080/node_modules/chai/chai.js:7587:18
BuiltIn/</<@http://localhost:8080/test/test.js:358:13

As far as FileList, yes, unfortunately, we can't readily test this in the browser, as one can neither set the files on an input element dynamically nor create a FileList via a constructor (this also limits our ability to genuinely clone FileList, but we can polyfill it well enough).

As far as Firefox and Intl.Collator, I think I'll need to take a closer look.

Current versions of Chrome and Firefox both allow modifying the FileList property, so those tests are now passing.

Besides updating to the latest Typeson which has some observer reporting enhancements, I just now updated the tests for Intl.Collator (and also for ImageBitmap) to deal with some browser idiosyncrasies so this issue should now be fixed.

Do you want to confirm first before I close this issue? Also, are you ready for a 1.0.0 release now?

I could verify it and close it. Thank you so much for taking this library so far. I don't think I can determine the current status of the library better than you can, so feel free to bump version to v1.0.0.

My pleasure regarding the library--was nice to have had the unpleasantries with cyclic objects already handled as well as the well-conceptualized extensibility.

So I should wait to bump the version before you are satisfied to close the issue then?

All tests pass now 👍 (Needed to upgrade nodejs from 6 to LTS (version 8) because one of the tests uses Object.values)