Files
bun.sh/packages/bun-vscode/example/example.test.ts
Ashcon Partovi f2553d2454 More support for DAP (#4380)
* Fix reconnect with --watch

* Support setVariable

* Support setExpression

* Support watch variables

* Conditional and hit breakpoints

* Support exceptionInfo

* Support goto and gotoTargets

* Support completions

* Support both a URL and UNIX inspector at the same time

* Fix url

* WIP, add timeouts to figure out issue

* Fix messages being dropped from debugger.ts

* Progress

* Fix breakpoints and ref-event-loop

* More fixes

* Fix exit

* Make hovers better

* Fix --hot
2023-08-29 23:44:39 -07:00

29 lines
744 B
TypeScript

import { describe, test, expect } from "bun:test";
describe("example", () => {
test("it works", () => {
expect(1).toBe(1);
expect(1).not.toBe(2);
expect(() => {
throw new TypeError("Oops! I did it again.");
}).toThrow();
expect(() => {
throw new Error("Parent error.", {
cause: new TypeError("Child error."),
});
}).toThrow();
expect(() => {
throw new AggregateError([new TypeError("Child error 1."), new TypeError("Child error 2.")], "Parent error.");
}).toThrow();
expect(() => {
throw "This is a string error";
}).toThrow();
expect(() => {
throw {
message: "This is an object error",
code: -1021,
};
}).toThrow();
});
});