Skip to content

Commit 080383b

Browse files
committed
Add build test for @notundefined error
1 parent 4311473 commit 080383b

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// @ts-check
2+
3+
import * as assert from "node:assert";
4+
import { setup } from "#dev/process";
5+
import { normalizeNewlines } from "#dev/utils";
6+
7+
const { execBuild } = setup(import.meta.dirname);
8+
9+
const out = await execBuild();
10+
11+
assert.equal(
12+
normalizeNewlines(out.stdout.slice(out.stdout.indexOf("input.res:2:1-12"))),
13+
`input.res:2:1-12
14+
15+
1 │ @notUndefined
16+
2 │ type t = int
17+
3 │
18+
19+
@notUndefined can only be used on abstract types
20+
21+
FAILED: cannot make progress due to previous errors.
22+
`,
23+
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@notUndefined
2+
type t = int
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"name": "not_undefined_attribute",
3+
"version": "0.1.0",
4+
"sources": ["."]
5+
}

0 commit comments

Comments
 (0)