Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added some more diverse tests for object literal keys

  • Loading branch information...
commit 945fed7b76ba7665750d884587de7edce6218fa4 1 parent 1a183d7
Michael Ficarra authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 test/objects.coffee
4 test/objects.coffee
View
@@ -12,11 +12,15 @@ suite 'Object Literals', ->
eq nonce, { a : nonce }.a
eq nonce, {a: nonce,}.a
eq nonce, {0: nonce}[0]
+ eq nonce, {0x0: nonce}[0]
+ eq nonce, {'0x0': nonce}['0x0']
eq nonce, {1e3: nonce}[1e3]
eq nonce, {a:0,b:nonce,c:0}.b
eq nonce, {a: 0, b: nonce, c: 0}.b
eq nonce, {a: 0, b: nonce, c: 0, }.b
eq nonce, { a : 0 , b : nonce, c : 0 }.b
+ eq nonce, {'a': nonce}.a
+ eq nonce, {'s p a c e s': nonce}['s p a c e s']
test 'reserved words as keys', ->
nonce = {}
Please sign in to comment.
Something went wrong with that request. Please try again.