Skip to content

Commit 3d0d204

Browse files
committed
improve test
1 parent 3dac15c commit 3d0d204

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

test/map.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { SourceMapConsumer, SourceMapGenerator } from 'source-map-js'
22
import { removeSync, outputFileSync } from 'fs-extra'
33
import { is, type, equal, match } from 'uvu/assert'
44
import { join, resolve, parse } from 'path'
5+
import { pathToFileURL } from 'url'
56
import { existsSync } from 'fs'
67
import { test } from 'uvu'
78

@@ -730,6 +731,9 @@ test('absolute sourcemaps have source contents', () => {
730731
absolute: true
731732
}
732733
})
734+
equal(result.map.toJSON().sources, [
735+
pathToFileURL('/dir/to/a.css').toString()
736+
])
733737
equal(result.map.toJSON().sourcesContent, ['a{}'])
734738
})
735739

0 commit comments

Comments
 (0)