-
Notifications
You must be signed in to change notification settings - Fork 516
[import-bytes] add initial tests for import bytes proposal #4648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| import value from './bytes-from-empty-FIXTURE.bin' with { type: 'bytes' }; | ||
|
|
||
| assert(value instanceof Uint8Array); | ||
| assert(value.buffer instanceof ArrayBuffer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there should be some kind of assertion that it's immutable (not sure what that'd look like tho)
same throughout
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The lines below are checking for immutable (asserts that an error is thrown on resize and also on transfer)
assert.throws(TypeError, function() {
value.buffer.resize(0);
});
assert.throws(TypeError, function() {
value.buffer.transfer();
});Let me know if there is a better way to check for immutability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Directly call the immutable accessor property https://tc39.es/proposal-immutable-arraybuffer/#sec-get-arraybuffer.prototype.immutable ?
|
Note, the empty file is failing because fixture files need to contain the string |
|
@ptomato Thanks! I updated the fixtures to use underscores and that solved the However, I ran into another error. So I pushed some changes to the python code to ignore binary files. I see there are still a few engines on circleci that are failing. Please let me know how to proceed, thanks! |
Uh oh!
There was an error while loading. Please reload this page.