2
0
mirror of https://github.com/iconify/collections-json.git synced 2024-11-08 06:15:22 +00:00

test: use normalize from 'pathe on locate` test

This commit is contained in:
Joaquín Sánchez Jiménez 2021-09-23 13:00:01 +02:00
parent f09f318162
commit 3182160f5b

View File

@ -1,10 +1,10 @@
import { PathLike } from 'fs'
import { resolve } from 'pathe'
import { resolve, normalize } from 'pathe'
export const locateTest = (locate: (name: string) => PathLike) => {
test('mdi resolves the json collection', () => {
const received = locate('mdi') as string
const expected = resolve('./json/mdi.json').replace(/\\/g, '/')
const expected = normalize(resolve('./json/mdi.json'))
expect(received).toBe(expected)
})
}