Skip to content

Instantly share code, notes, and snippets.

@heapwolf
Created July 29, 2010 15:45
Show Gist options
  • Select an option

  • Save heapwolf/498470 to your computer and use it in GitHub Desktop.

Select an option

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));
}
@Marak

Marak commented Jul 29, 2010

Copy link
Copy Markdown

i assert awesomeness

@heapwolf

Copy link
Copy Markdown
Author

i return booleaness =)

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