Skip to content

linder3hs/ddh-template-bun

Repository files navigation

DOMAIN DRIVE HEXAGON - bun

  • bun: Incredibly fast JavaScript runtime, bundler, transpiler and package manager – all in one.

Template for projects with bun

This a new template for projects with bun.

Bun test

Bun implements a test framework for JavaScript.

bun wiptest

with this we are replace jest

  • Example

test/app.test.ts

import { test, expect } from "bun:test";
import { sum } from "../src/app";

test("sum", () => {
  expect(sum(1, 2)).toBe(3);
});

package.json

{
  "scripts": {
    "test": "bun wiptest"
  },
}

terminal

bun run test