Skip to content

Commit 15bc3c2

Browse files
committed
JS: Add test with wrapper function
1 parent d94d459 commit 15bc3c2

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
function wrap(fn) {
2+
return x => fn(x);
3+
}
4+
5+
function f() {}
6+
export const f1 = wrap(f); // $ method=(pack12).f1
7+
export const f2 = wrap(f); // $ method=(pack12).f2
8+
9+
function g() {}
10+
export const g1 = wrap(g); // $ method=(pack12).g1
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "pack12",
3+
"main": "./index.js"
4+
}

0 commit comments

Comments
 (0)