Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
test262
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pmaksimo
test262
Commits
35adcb2a
"git@gitlab.doc.ic.ac.uk:pmaksimo/test262.git" did not exist on "8f7dc1912aa1977de9924b92a282a40c52f2d6e1"
Commit
35adcb2a
authored
7 years ago
by
Caio Lima
Browse files
Options
Downloads
Patches
Plain Diff
Adding case to computed property
parent
e4b64ecc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/dstr-assignment/obj-rest-computed-property.case
+38
-0
38 additions, 0 deletions
src/dstr-assignment/obj-rest-computed-property.case
with
38 additions
and
0 deletions
src/dstr-assignment/obj-rest-computed-property.case
0 → 100644
+
38
−
0
View file @
35adcb2a
// Copyright (C) 2017 Caio Lima. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: >
Destructuring field can be a computed property, i.e it can be defined
only at runtime. Rest operantion needs to skip these properties as well.
template: default
esid: pending
includes: [propertyHelper.js]
features: [object-rest]
---*/
//- setup
var a = "foo";
//- elems
{[a]:b, ...rest}
//- vals
{ foo: 1, bar: 2, baz: 3 }
//- body
assert.sameValue(b, 1);
assert.sameValue(rest.bar, 2);
assert.sameValue(rest.baz, 3);
assert.sameValue(Object.getOwnPropertyDescriptor(rest, "foo"), undefined);
verifyProperty(rest, "bar", {
enumerable: true,
writable: true,
configurable: true
});
verifyProperty(rest, "baz", {
enumerable: true,
writable: true,
configurable: true
});
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment