Skip to content
Snippets Groups Projects
Commit 22afcaf2 authored by Christian Bager Bach Houmann's avatar Christian Bager Bach Houmann
Browse files

add test for url extension func

parent 3bb39c98
No related branches found
No related tags found
No related merge requests found
import { describe, test, expect } from "vitest";
import getUrlExtension from "./getUrlExtension";
describe("getUrlExtension", () => {
test("should return the extension of a url", () => {
expect(getUrlExtension("https://example.com/file.mp3")).toBe("mp3");
});
test("should return the extension of a url with params", () => {
expect(getUrlExtension("https://example.com/file.mp3?key=value&key2=.mpegvalue")).toBe("mp3");
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment