Better PreviousMap#withSources test

This commit is contained in:
Andrey Sitnik
2014-06-15 15:30:21 +09:00
parent a4b4590b4e
commit 3dc49e64a1
+3 -2
View File
@@ -35,10 +35,11 @@ describe 'PreviousMap', ->
root.prevMap.annotation.should.eql('# sourceMappingURL=a.css.map')
it 'checks previous sources', ->
root = parse('a{}', map: @map)
map = { version: 3, file: 'a.css', sources: [], names: [], mappings: ''}
root = parse('a{}', map: map)
root.prevMap.withSources.should.be.false
map = '{"version":3,"file":"a","sources":["a{}"],"names":[],"mappings":""}'
map.sources.push('a{}')
root = parse('a{}', map: map)
root.prevMap.withSources.should.be.true