| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Adds a single test for a vm with an indexed property.
There was a problem hiding this comment.
Specifically this test adds coverage for IndexedPropertyGetterCallback and IndexedPropertyDeleterCallback
Sorry, something went wrong.
|
@nodejs/vm |
Sorry, something went wrong.
|
|
||
| const x = vm.createContext({ get a() { return 5; } }); | ||
|
|
||
| assert.strictEqual(x.a, 5); |
There was a problem hiding this comment.
Does IndexedPropertyGetterCallback apply for properties returning index values or indexed properties?
Reflect.defineProperty(x, '1', { get() { return 2 } })
Sorry, something went wrong.
There was a problem hiding this comment.
I just tested that scenario and in fact, x[1] === 2. If that's the question. I'm not sure I quite understand it.
Sorry, something went wrong.
There was a problem hiding this comment.
This test doesn't look like its testing index-like property names and is instead checking properties with index-like values. I'm not entirely sure what this test is trying to cover.
Sorry, something went wrong.
|
@jdalton How about now? We are accessing indexed property ctx2[1]. |
Sorry, something went wrong.
|
Could you add a comment above the test explaining which component it's testing, e.g. IndexedPropertyGetterCallback. |
Sorry, something went wrong.
Sorry, something went wrong.
Adds a single test for a vm with an indexed property. PR-URL: #23318 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: John-David Dalton <john.david.dalton@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Adds a single test for a vm with an indexed property. PR-URL: #23318 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: John-David Dalton <john.david.dalton@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Adds a single test for a vm with an indexed property. PR-URL: #23318 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: John-David Dalton <john.david.dalton@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Adds a single test for a vm with an indexed property. PR-URL: #23318 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: John-David Dalton <john.david.dalton@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Adds a single test for a vm with an indexed property. PR-URL: #23318 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: John-David Dalton <john.david.dalton@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Adds a single test for a vm with an indexed property. PR-URL: #23318 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: John-David Dalton <john.david.dalton@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
| Back | FazBrowse Home | New Git URL |
This commit adds a test for a vm with a single indexed property
Checklist