diff --git a/Text/Jasmine/Pretty.hs b/Text/Jasmine/Pretty.hs
--- a/Text/Jasmine/Pretty.hs
+++ b/Text/Jasmine/Pretty.hs
@@ -142,7 +142,10 @@
 rJS xs = hcat $ map renderJS xs
 
 commaList :: [JSNode] -> BB.Builder
-commaList xs = (hcat $ (punctuate comma (toDoc xs)))
+commaList [] = empty
+commaList xs = (hcat $ (punctuate comma (toDoc xs') ++ trail))
+  where
+    (xs', trail) = if (last xs == JSLiteral ",") then (init xs, [comma]) else (xs,[])
 
 commaListList :: [[JSNode]] -> BB.Builder
 commaListList xs = (hcat $ punctuate comma $ map rJS xs)
diff --git a/hjsmin.cabal b/hjsmin.cabal
--- a/hjsmin.cabal
+++ b/hjsmin.cabal
@@ -1,5 +1,5 @@
 name:            hjsmin
-version:         0.0.7
+version:         0.0.8
 license:         BSD3
 license-file:    LICENSE
 author:          Alan Zimmerman <alan.zimm@gmail.com>
diff --git a/runtests.hs b/runtests.hs
--- a/runtests.hs
+++ b/runtests.hs
@@ -5,7 +5,6 @@
 
 import Data.Char
 import Text.Jasmine
---import Text.Jasmine.Parse -- hiding (main)
 import Language.JavaScript.Parser
 import Text.Jasmine.Pretty
 import qualified Data.ByteString.Lazy as LB
@@ -30,6 +29,7 @@
     , testCase "01_semi1.js"      case01_semi1 
     , testCase "min_100_animals"  case_min_100_animals
     , testCase "mergeStrings"     caseMergeStrings
+    , testCase "TrailingCommas"   caseTrailingCommas
     ]
 
 testSuiteMin :: Test
@@ -46,6 +46,7 @@
     , testCase "minMergeStrings"  caseMinMergeStrings
     , testCase "EitherLeft"       caseEitherLeft  
     , testCase "EitherRight"      caseEitherRight  
+    , testCase "TrailingCommas"   caseMinTrailingCommas
     ]
 
 testSuiteFiles :: Test
@@ -216,6 +217,13 @@
 caseEitherRight  =  
   Right (LB.fromChunks [(E.encodeUtf8 $ T.pack "a=\"no syntax error\"")]) @=? minifym (LB.fromChunks [(E.encodeUtf8 $ T.pack "a=\"no syntax error\";")])
                   
+srcTrailingCommas = "x={a:1,};y=[d,e,];"
+caseTrailingCommas =
+  "Right (JSSourceElementsTop [JSExpression [JSIdentifier \"x\",JSOperator \"=\",JSObjectLiteral [JSPropertyNameandValue (JSIdentifier \"a\") [JSDecimal \"1\"],JSLiteral \",\"]],JSLiteral \";\",JSExpression [JSIdentifier \"y\",JSOperator \"=\",JSArrayLiteral [JSIdentifier \"d\",JSElision [],JSIdentifier \"e\",JSLiteral \",\"]],JSLiteral \";\"])"
+  @=? (show $ parseProgram srcTrailingCommas)
+caseMinTrailingCommas =  
+  testMinify "x={a:1,};y=[d,e,]" srcTrailingCommas
+  
 -- ---------------------------------------------------------------------
 -- utilities
 
