Conversation
6dcc159 to
7e147ae
Compare
|
|
||
| t.assert(new fb.constructor() instanceof FarBaseClass); | ||
| t.throws(() => fb.constructor(), { | ||
| // TODO message depends on JS engine, and so is a fragile golden test |
There was a problem hiding this comment.
how can this TODO be solved?
isn't it fair to assume all of Endo's tests run in whatever its CI matrix covers?
There was a problem hiding this comment.
Attn @kriskowal @warner
To truly not rely on any unspecified JS, all I may test is the error type. But I do like ensuring that the test case is failing for the reason it should. I don't know how to do that without this fragile dependency.
Recommendations?
7e147ae to
5a2c77d
Compare
mhofman
left a comment
There was a problem hiding this comment.
My main concern with this PR is this, and the difference with ExoClass. Since there is no similar way to handle state, users will simply rely on private fields, which we can't prevent. Also they are free to add accessors, which won't satisfy passStyleOf checks.
I would prefer supporting class syntax in a way compatible with our encapsulation paradigm (instance private state, not class scope private state), and making sure we fail early for class definitions that are not actually remotable.
9f56090 to
0ac91dc
Compare
|
See also #1773 |
0ac91dc to
3025328
Compare
490866e to
f4d09fc
Compare
f4d09fc to
dd0088f
Compare
|
Closing in favor of #1809 |
Support use of JS classes to define far objects as class instances.
This was already possible, as demonstrated by prior tests in test-passStyleOf.js . This PR merely provides a base class to make this easier, and tests it.