Skip to content

Commit d9f4e4a

Browse files
committed
JS: Add tests for functions with "use server" directive
1 parent 7dd7246 commit d9f4e4a

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
async function getData(
2+
x, // $ MISSING: threatModelSource=remote
3+
y) { // $ MISSING: threatModelSource=remote
4+
"use server";
5+
}
6+
7+
async function getData2(
8+
x, // should not be remote flow sources (because the function does not have "use server")
9+
y) {
10+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
"use server";
2+
3+
export async function getData(
4+
x, // $ MISSING: threatModelSource=remote
5+
y) { // $ MISSING: threatModelSource=remote
6+
}
7+
8+
async function getData2(
9+
x, // should not be remote flow sources (because the function is not exported)
10+
y) {
11+
}

0 commit comments

Comments
 (0)