Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
benkates committed Jan 8, 2024
1 parent 41dfcde commit 256fec4
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions src/index.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
import { describe, it, expect } from 'vitest';
import { describe, it, expect } from "vitest";
import { dollarFormat, kebabCase } from "$lib/utils/index.js";

describe('sum test', () => {
it('adds 1 + 2 to equal 3', () => {
expect(1 + 2).toBe(3);
});
describe("sum test", () => {
it("adds 1 + 2 to equal 3", () => {
expect(1 + 2).toBe(3);
});
});

describe("kebab-case test", () => {
it("converts a string to kebab-case", () => {
expect(kebabCase("Hello World")).toBe("hello-world");
});
});

describe("dollar format test", () => {
it("converts a number to a dollar-formatted string", () => {
expect(dollarFormat(1000000)).toBe("$1,000,000");
});
});

0 comments on commit 256fec4

Please sign in to comment.