 
 		it 'should require groupedMatchers to be an array', ->
 			assert.throws -> anysort.grouped sortable, before
+
+		it 'should not mutate input list', ->
+			sorted = anysort.grouped sortable, [before]
+			assert.notDeepEqual sorted, sortable
+			assert.equal sorted.length, sortable.length
 
 		it 'should sort with groupedMatchers', ->
 			sorted = anysort.grouped sortable, [before]

			start = matchedBefore.length
			end = start + matchedAfter.length
			assert.deepEqual matchedAfter, sorted[start...end]


	describe '.grouped', ->
		before = /to/
		after = ['path/zjs/baz.js', 'path/zjs/aaz.js']

		it 'should require only the first argument (list)', ->
			assert.throws anysort.grouped
