Skip to content

Instantly share code, notes, and snippets.

@heapwolf
Created July 29, 2010 15:45
Show Gist options
  • Save heapwolf/498470 to your computer and use it in GitHub Desktop.
Save heapwolf/498470 to your computer and use it in GitHub Desktop.
try {
Object.create(null, {foo: { get: 0 }});
assertTrue(false);
} catch (e) {
assertTrue(/Getter must be a function/.test(e));
}
try {
Object.create(null, {foo: { set: 0 }});
assertTrue(false);
} catch (e) {
assertTrue(/Setter must be a function/.test(e));
}
try {
Object.create(null, {foo: { set: 0, get: 0 }});
assertTrue(false);
} catch (e) {
assertTrue(/Getter must be a function/.test(e));
}
@heapwolf
Copy link
Author

i return booleaness =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment