Subject: [PATCH v2 4/4] t4018: add tests for javascript export type function declarations

From: "Derick W. de M. Frias" <[email-masked]>
Date: Mon, 23 Jun 2025 03:35:49 -0300

Add tests for javascript export function declarations as in ECMAScript ES6 and CommonJS.

Signed-off-by: Derick W. de M. Frias <[email-masked]>
---
 t/t4018/javascript-dotexpors-async-anonymous-function       | 3 +++
 t/t4018/javascript-dotexports-anonymous-function            | 3 +++
 t/t4018/javascript-dotexports-arrow-function                | 4 ++++
 t/t4018/javascript-dotexports-arrow-function-2              | 4 ++++
 t/t4018/javascript-dotexports-arrow-function-3              | 1 +
 t/t4018/javascript-dotexports-assigned-function             | 1 +
 t/t4018/javascript-dotexports-async-arrow-function          | 3 +++
 t/t4018/javascript-dotexports-async-arrow-function-2        | 4 ++++
 t/t4018/javascript-dotexports-async-arrow-function-3        | 1 +
 t/t4018/javascript-dotexports-async-function                | 4 ++++
 ...javascript-dotexports-async-generator-anonymous-function | 5 +++++
 ...vascript-dotexports-async-generator-anonymous-function-2 | 5 +++++
 t/t4018/javascript-dotexports-async-generator-function      | 5 +++++
 t/t4018/javascript-dotexports-async-generator-function-2    | 5 +++++
 t/t4018/javascript-dotexports-function                      | 4 ++++
 t/t4018/javascript-dotexports-generator-anonymous-function  | 5 +++++
 .../javascript-dotexports-generator-anonymous-function-2    | 5 +++++
 t/t4018/javascript-dotexports-generator-function            | 5 +++++
 t/t4018/javascript-dotexports-generator-function-2          | 5 +++++
 t/t4018/javascript-export-arrow-function                    | 4 ++++
 t/t4018/javascript-export-async-anonymous-assigned-function | 4 ++++
 t/t4018/javascript-export-async-arrow-function              | 4 ++++
 t/t4018/javascript-export-async-function                    | 4 ++++
 ...cript-export-async-generator-anonymous-assigned-function | 4 ++++
 ...ipt-export-async-generator-anonymous-assigned-function-2 | 4 ++++
 t/t4018/javascript-export-async-generator-assigned-function | 5 +++++
 .../javascript-export-async-generator-assigned-function-2   | 5 +++++
 t/t4018/javascript-export-async-generator-function          | 5 +++++
 t/t4018/javascript-export-async-generator-function-2        | 5 +++++
 t/t4018/javascript-export-function                          | 4 ++++
 t/t4018/javascript-export-generator-assigned-function       | 6 ++++++
 t/t4018/javascript-export-generator-assigned-function-2     | 6 ++++++
 t/t4018/javascript-export-generator-function                | 5 +++++
 t/t4018/javascript-export-generator-function-2              | 5 +++++
 t/t4018/javascript-module-dotexports-anonymous-function     | 3 +++
 t/t4018/javascript-module-dotexports-arrow-function         | 4 ++++
 t/t4018/javascript-module-dotexports-arrow-function-2       | 4 ++++
 t/t4018/javascript-module-dotexports-arrow-function-3       | 1 +
 t/t4018/javascript-module-dotexports-assigned-function      | 1 +
 t/t4018/javascript-module-dotexports-async-arrow-function   | 3 +++
 t/t4018/javascript-module-dotexports-async-arrow-function-2 | 4 ++++
 t/t4018/javascript-module-dotexports-async-arrow-function-3 | 1 +
 t/t4018/javascript-module-dotexports-async-function         | 4 ++++
 ...ipt-module-dotexports-async-generator-anonymous-function | 5 +++++
 ...t-module-dotexports-async-generator-anonymous-function-2 | 5 +++++
 .../javascript-module-dotexports-async-generator-function   | 5 +++++
 .../javascript-module-dotexports-async-generator-function-2 | 5 +++++
 t/t4018/javascript-module-dotexports-function               | 4 ++++
 ...avascript-module-dotexports-generator-anonymous-function | 5 +++++
 ...ascript-module-dotexports-generator-anonymous-function-2 | 5 +++++
 t/t4018/javascript-module-dotexports-generator-function     | 5 +++++
 t/t4018/javascript-module-dotexports-generator-function-2   | 5 +++++
 52 files changed, 211 insertions(+)
 create mode 100644 t/t4018/javascript-dotexpors-async-anonymous-function
 create mode 100644 t/t4018/javascript-dotexports-anonymous-function
 create mode 100644 t/t4018/javascript-dotexports-arrow-function
 create mode 100644 t/t4018/javascript-dotexports-arrow-function-2
 create mode 100644 t/t4018/javascript-dotexports-arrow-function-3
 create mode 100644 t/t4018/javascript-dotexports-assigned-function
 create mode 100644 t/t4018/javascript-dotexports-async-arrow-function
 create mode 100644 t/t4018/javascript-dotexports-async-arrow-function-2
 create mode 100644 t/t4018/javascript-dotexports-async-arrow-function-3
 create mode 100644 t/t4018/javascript-dotexports-async-function
 create mode 100644 t/t4018/javascript-dotexports-async-generator-anonymous-function
 create mode 100644 t/t4018/javascript-dotexports-async-generator-anonymous-function-2
 create mode 100644 t/t4018/javascript-dotexports-async-generator-function
 create mode 100644 t/t4018/javascript-dotexports-async-generator-function-2
 create mode 100644 t/t4018/javascript-dotexports-function
 create mode 100644 t/t4018/javascript-dotexports-generator-anonymous-function
 create mode 100644 t/t4018/javascript-dotexports-generator-anonymous-function-2
 create mode 100644 t/t4018/javascript-dotexports-generator-function
 create mode 100644 t/t4018/javascript-dotexports-generator-function-2
 create mode 100644 t/t4018/javascript-export-arrow-function
 create mode 100644 t/t4018/javascript-export-async-anonymous-assigned-function
 create mode 100644 t/t4018/javascript-export-async-arrow-function
 create mode 100644 t/t4018/javascript-export-async-function
 create mode 100644 t/t4018/javascript-export-async-generator-anonymous-assigned-function
 create mode 100644 t/t4018/javascript-export-async-generator-anonymous-assigned-function-2
 create mode 100644 t/t4018/javascript-export-async-generator-assigned-function
 create mode 100644 t/t4018/javascript-export-async-generator-assigned-function-2
 create mode 100644 t/t4018/javascript-export-async-generator-function
 create mode 100644 t/t4018/javascript-export-async-generator-function-2
 create mode 100644 t/t4018/javascript-export-function
 create mode 100644 t/t4018/javascript-export-generator-assigned-function
 create mode 100644 t/t4018/javascript-export-generator-assigned-function-2
 create mode 100644 t/t4018/javascript-export-generator-function
 create mode 100644 t/t4018/javascript-export-generator-function-2
 create mode 100644 t/t4018/javascript-module-dotexports-anonymous-function
 create mode 100644 t/t4018/javascript-module-dotexports-arrow-function
 create mode 100644 t/t4018/javascript-module-dotexports-arrow-function-2
 create mode 100644 t/t4018/javascript-module-dotexports-arrow-function-3
 create mode 100644 t/t4018/javascript-module-dotexports-assigned-function
 create mode 100644 t/t4018/javascript-module-dotexports-async-arrow-function
 create mode 100644 t/t4018/javascript-module-dotexports-async-arrow-function-2
 create mode 100644 t/t4018/javascript-module-dotexports-async-arrow-function-3
 create mode 100644 t/t4018/javascript-module-dotexports-async-function
 create mode 100644 t/t4018/javascript-module-dotexports-async-generator-anonymous-function
 create mode 100644 t/t4018/javascript-module-dotexports-async-generator-anonymous-function-2
 create mode 100644 t/t4018/javascript-module-dotexports-async-generator-function
 create mode 100644 t/t4018/javascript-module-dotexports-async-generator-function-2
 create mode 100644 t/t4018/javascript-module-dotexports-function
 create mode 100644 t/t4018/javascript-module-dotexports-generator-anonymous-function
 create mode 100644 t/t4018/javascript-module-dotexports-generator-anonymous-function-2
 create mode 100644 t/t4018/javascript-module-dotexports-generator-function
 create mode 100644 t/t4018/javascript-module-dotexports-generator-function-2

diff --git a/t/t4018/javascript-dotexpors-async-anonymous-function b/t/t4018/javascript-dotexpors-async-anonymous-function
new file mode 100644
index 0000000000..9f970a2343
--- /dev/null
+++ b/t/t4018/javascript-dotexpors-async-anonymous-function
@@ -0,0 +1,3 @@
+exports.RIGHT = async function(a, b) {
+    return a + b; // ChangeMe
+};
diff --git a/t/t4018/javascript-dotexports-anonymous-function b/t/t4018/javascript-dotexports-anonymous-function
new file mode 100644
index 0000000000..2fa9775c95
--- /dev/null
+++ b/t/t4018/javascript-dotexports-anonymous-function
@@ -0,0 +1,3 @@
+exports.RIGHT = function(a, b) {
+    return a + b; //ChangeMe
+};
diff --git a/t/t4018/javascript-dotexports-arrow-function b/t/t4018/javascript-dotexports-arrow-function
new file mode 100644
index 0000000000..a7d9741e90
--- /dev/null
+++ b/t/t4018/javascript-dotexports-arrow-function
@@ -0,0 +1,4 @@
+exports.RIGHT = (a, b) => {	
+
+    return a+b; //ChangeMe
+};
diff --git a/t/t4018/javascript-dotexports-arrow-function-2 b/t/t4018/javascript-dotexports-arrow-function-2
new file mode 100644
index 0000000000..f9cd237bb8
--- /dev/null
+++ b/t/t4018/javascript-dotexports-arrow-function-2
@@ -0,0 +1,4 @@
+exports.RIGHT = a => {	
+
+    return a+1; //ChangeMe
+};
diff --git a/t/t4018/javascript-dotexports-arrow-function-3 b/t/t4018/javascript-dotexports-arrow-function-3
new file mode 100644
index 0000000000..cc3f1ec017
--- /dev/null
+++ b/t/t4018/javascript-dotexports-arrow-function-3
@@ -0,0 +1 @@
+exports.RIGHT = a => a+1; //ChangeMe
diff --git a/t/t4018/javascript-dotexports-assigned-function b/t/t4018/javascript-dotexports-assigned-function
new file mode 100644
index 0000000000..308cc37095
--- /dev/null
+++ b/t/t4018/javascript-dotexports-assigned-function
@@ -0,0 +1 @@
+exports.RIGHT = PreviousFunction; //ChangeMe
diff --git a/t/t4018/javascript-dotexports-async-arrow-function b/t/t4018/javascript-dotexports-async-arrow-function
new file mode 100644
index 0000000000..01df800f19
--- /dev/null
+++ b/t/t4018/javascript-dotexports-async-arrow-function
@@ -0,0 +1,3 @@
+exports.RIGHT = async (a, b) => {
+    return a + b; // ChangeMe
+};
diff --git a/t/t4018/javascript-dotexports-async-arrow-function-2 b/t/t4018/javascript-dotexports-async-arrow-function-2
new file mode 100644
index 0000000000..453da8fcb4
--- /dev/null
+++ b/t/t4018/javascript-dotexports-async-arrow-function-2
@@ -0,0 +1,4 @@
+exports.RIGHT = async a => {
+    
+    return a + 1; // ChangeMe
+};
diff --git a/t/t4018/javascript-dotexports-async-arrow-function-3 b/t/t4018/javascript-dotexports-async-arrow-function-3
new file mode 100644
index 0000000000..74b028cf1c
--- /dev/null
+++ b/t/t4018/javascript-dotexports-async-arrow-function-3
@@ -0,0 +1 @@
+exports.RIGHT = async a => a + 1; // ChangeMe
diff --git a/t/t4018/javascript-dotexports-async-function b/t/t4018/javascript-dotexports-async-function
new file mode 100644
index 0000000000..88b3539544
--- /dev/null
+++ b/t/t4018/javascript-dotexports-async-function
@@ -0,0 +1,4 @@
+exports.RIGHT = async function ChangeMe(a, b) {
+    
+    return a + b; // ChangeMe
+}
diff --git a/t/t4018/javascript-dotexports-async-generator-anonymous-function b/t/t4018/javascript-dotexports-async-generator-anonymous-function
new file mode 100644
index 0000000000..9e90bdf489
--- /dev/null
+++ b/t/t4018/javascript-dotexports-async-generator-anonymous-function
@@ -0,0 +1,5 @@
+exports.RIGHT = async function* () {
+    
+    yield 1;
+    yield 2; // ChangeMe
+};
diff --git a/t/t4018/javascript-dotexports-async-generator-anonymous-function-2 b/t/t4018/javascript-dotexports-async-generator-anonymous-function-2
new file mode 100644
index 0000000000..efe2abe4f7
--- /dev/null
+++ b/t/t4018/javascript-dotexports-async-generator-anonymous-function-2
@@ -0,0 +1,5 @@
+exports.RIGHT = async function *() {
+    
+    yield 1;
+    yield 2; // ChangeMe
+};
diff --git a/t/t4018/javascript-dotexports-async-generator-function b/t/t4018/javascript-dotexports-async-generator-function
new file mode 100644
index 0000000000..5d352b5f29
--- /dev/null
+++ b/t/t4018/javascript-dotexports-async-generator-function
@@ -0,0 +1,5 @@
+exports.RIGHT = async function* ChangeMe() {
+    
+    yield 1;
+    yield 2;
+}
diff --git a/t/t4018/javascript-dotexports-async-generator-function-2 b/t/t4018/javascript-dotexports-async-generator-function-2
new file mode 100644
index 0000000000..cddc4f9628
--- /dev/null
+++ b/t/t4018/javascript-dotexports-async-generator-function-2
@@ -0,0 +1,5 @@
+exports.RIGHT = async function *ChangeMe() {
+    
+    yield 1;
+    yield 2;
+}
diff --git a/t/t4018/javascript-dotexports-function b/t/t4018/javascript-dotexports-function
new file mode 100644
index 0000000000..4c0c622d13
--- /dev/null
+++ b/t/t4018/javascript-dotexports-function
@@ -0,0 +1,4 @@
+exports.RIGHT = function ChangeMe(a, b) {
+    
+    return a + b; 
+};
diff --git a/t/t4018/javascript-dotexports-generator-anonymous-function b/t/t4018/javascript-dotexports-generator-anonymous-function
new file mode 100644
index 0000000000..4899abbb7b
--- /dev/null
+++ b/t/t4018/javascript-dotexports-generator-anonymous-function
@@ -0,0 +1,5 @@
+exports.RIGHT = function* () {
+    
+    yield 1;
+    yield 2; // ChangeMe
+}
diff --git a/t/t4018/javascript-dotexports-generator-anonymous-function-2 b/t/t4018/javascript-dotexports-generator-anonymous-function-2
new file mode 100644
index 0000000000..1f1e9995b2
--- /dev/null
+++ b/t/t4018/javascript-dotexports-generator-anonymous-function-2
@@ -0,0 +1,5 @@
+exports.RIGHT = function *() {
+    
+    yield 1;
+    yield 2; // ChangeMe
+};
diff --git a/t/t4018/javascript-dotexports-generator-function b/t/t4018/javascript-dotexports-generator-function
new file mode 100644
index 0000000000..837646cacc
--- /dev/null
+++ b/t/t4018/javascript-dotexports-generator-function
@@ -0,0 +1,5 @@
+exports.RIGHT = function* ChangeMe() {
+
+    yield 1;
+    yield 2;
+}
diff --git a/t/t4018/javascript-dotexports-generator-function-2 b/t/t4018/javascript-dotexports-generator-function-2
new file mode 100644
index 0000000000..0cc3729220
--- /dev/null
+++ b/t/t4018/javascript-dotexports-generator-function-2
@@ -0,0 +1,5 @@
+exports.RIGHT = function *ChangeMe() {
+
+    yield 1;
+    yield 2;
+}
diff --git a/t/t4018/javascript-export-arrow-function b/t/t4018/javascript-export-arrow-function
new file mode 100644
index 0000000000..098b457924
--- /dev/null
+++ b/t/t4018/javascript-export-arrow-function
@@ -0,0 +1,4 @@
+export const RIGHT = (a, b) => {
+    
+    return a + b; // ChangeMe
+};
diff --git a/t/t4018/javascript-export-async-anonymous-assigned-function b/t/t4018/javascript-export-async-anonymous-assigned-function
new file mode 100644
index 0000000000..0a36b97838
--- /dev/null
+++ b/t/t4018/javascript-export-async-anonymous-assigned-function
@@ -0,0 +1,4 @@
+export const RIGHT = async function(a, b) {
+    
+    return a + b; //ChangeMe
+};
diff --git a/t/t4018/javascript-export-async-arrow-function b/t/t4018/javascript-export-async-arrow-function
new file mode 100644
index 0000000000..557bcd1c23
--- /dev/null
+++ b/t/t4018/javascript-export-async-arrow-function
@@ -0,0 +1,4 @@
+export const RIGHT = async (a, b) => {
+    
+    return a + b; // ChangeMe
+};
diff --git a/t/t4018/javascript-export-async-function b/t/t4018/javascript-export-async-function
new file mode 100644
index 0000000000..169f4eeed3
--- /dev/null
+++ b/t/t4018/javascript-export-async-function
@@ -0,0 +1,4 @@
+export async function RIGHT(a, b) {
+
+    return a + b; // ChangeMe
+}
\ No newline at end of file
diff --git a/t/t4018/javascript-export-async-generator-anonymous-assigned-function b/t/t4018/javascript-export-async-generator-anonymous-assigned-function
new file mode 100644
index 0000000000..11ee37b2bc
--- /dev/null
+++ b/t/t4018/javascript-export-async-generator-anonymous-assigned-function
@@ -0,0 +1,4 @@
+export const RIGHT = async function* () {
+    yield 1;
+    yield 2; // ChangeMe
+};
\ No newline at end of file
diff --git a/t/t4018/javascript-export-async-generator-anonymous-assigned-function-2 b/t/t4018/javascript-export-async-generator-anonymous-assigned-function-2
new file mode 100644
index 0000000000..6bff23ed2b
--- /dev/null
+++ b/t/t4018/javascript-export-async-generator-anonymous-assigned-function-2
@@ -0,0 +1,4 @@
+export const RIGHT = async function *() {
+    yield 1;
+    yield 2; // ChangeMe
+};
\ No newline at end of file
diff --git a/t/t4018/javascript-export-async-generator-assigned-function b/t/t4018/javascript-export-async-generator-assigned-function
new file mode 100644
index 0000000000..3d5b1e0879
--- /dev/null
+++ b/t/t4018/javascript-export-async-generator-assigned-function
@@ -0,0 +1,5 @@
+export const RIGHT = async function* ChangeMe() {
+
+    yield 1;
+    yield 2;
+};
diff --git a/t/t4018/javascript-export-async-generator-assigned-function-2 b/t/t4018/javascript-export-async-generator-assigned-function-2
new file mode 100644
index 0000000000..31c674f150
--- /dev/null
+++ b/t/t4018/javascript-export-async-generator-assigned-function-2
@@ -0,0 +1,5 @@
+export const RIGHT = async function *ChangeMe() {
+    
+    yield 1;
+    yield 2;
+};
diff --git a/t/t4018/javascript-export-async-generator-function b/t/t4018/javascript-export-async-generator-function
new file mode 100644
index 0000000000..548589e597
--- /dev/null
+++ b/t/t4018/javascript-export-async-generator-function
@@ -0,0 +1,5 @@
+export async function* RIGHT() {
+    
+    yield 1;
+    yield 2; // ChangeMe
+}
diff --git a/t/t4018/javascript-export-async-generator-function-2 b/t/t4018/javascript-export-async-generator-function-2
new file mode 100644
index 0000000000..99167142d7
--- /dev/null
+++ b/t/t4018/javascript-export-async-generator-function-2
@@ -0,0 +1,5 @@
+export async function *RIGHT() {
+
+    yield 1;
+    yield 2; // ChangeMe
+}
diff --git a/t/t4018/javascript-export-function b/t/t4018/javascript-export-function
new file mode 100644
index 0000000000..32f38c36c6
--- /dev/null
+++ b/t/t4018/javascript-export-function
@@ -0,0 +1,4 @@
+export function RIGHT(a, b) {
+
+    return a + b; // ChangeMe
+}
diff --git a/t/t4018/javascript-export-generator-assigned-function b/t/t4018/javascript-export-generator-assigned-function
new file mode 100644
index 0000000000..30398cd805
--- /dev/null
+++ b/t/t4018/javascript-export-generator-assigned-function
@@ -0,0 +1,6 @@
+export const RIGHT = function* () {
+
+    yield 1;
+    yield 2; // ChangeMe
+    
+};
\ No newline at end of file
diff --git a/t/t4018/javascript-export-generator-assigned-function-2 b/t/t4018/javascript-export-generator-assigned-function-2
new file mode 100644
index 0000000000..04d2021af5
--- /dev/null
+++ b/t/t4018/javascript-export-generator-assigned-function-2
@@ -0,0 +1,6 @@
+export const RIGHT = function *() {
+
+    yield 1;
+    yield 2; // ChangeMe
+    
+};
\ No newline at end of file
diff --git a/t/t4018/javascript-export-generator-function b/t/t4018/javascript-export-generator-function
new file mode 100644
index 0000000000..2ad38ff088
--- /dev/null
+++ b/t/t4018/javascript-export-generator-function
@@ -0,0 +1,5 @@
+export function* RIGHT() {
+
+    yield 1;
+    yield 2; // ChangeMe
+}
diff --git a/t/t4018/javascript-export-generator-function-2 b/t/t4018/javascript-export-generator-function-2
new file mode 100644
index 0000000000..56709a8ae9
--- /dev/null
+++ b/t/t4018/javascript-export-generator-function-2
@@ -0,0 +1,5 @@
+export function *RIGHT() {
+    
+    yield 1;
+    yield 2; // ChangeMe
+}
diff --git a/t/t4018/javascript-module-dotexports-anonymous-function b/t/t4018/javascript-module-dotexports-anonymous-function
new file mode 100644
index 0000000000..56c1641edb
--- /dev/null
+++ b/t/t4018/javascript-module-dotexports-anonymous-function
@@ -0,0 +1,3 @@
+module.exports.RIGHT = function(a, b) {
+    return a + b; //ChangeMe
+};
diff --git a/t/t4018/javascript-module-dotexports-arrow-function b/t/t4018/javascript-module-dotexports-arrow-function
new file mode 100644
index 0000000000..32dc4f865d
--- /dev/null
+++ b/t/t4018/javascript-module-dotexports-arrow-function
@@ -0,0 +1,4 @@
+module.exports.RIGHT = (a, b) => {	
+
+    return a+b; //ChangeMe
+};
diff --git a/t/t4018/javascript-module-dotexports-arrow-function-2 b/t/t4018/javascript-module-dotexports-arrow-function-2
new file mode 100644
index 0000000000..24d35f8d9e
--- /dev/null
+++ b/t/t4018/javascript-module-dotexports-arrow-function-2
@@ -0,0 +1,4 @@
+module.exports.RIGHT = a => {	
+
+    return a+1; //ChangeMe
+};
diff --git a/t/t4018/javascript-module-dotexports-arrow-function-3 b/t/t4018/javascript-module-dotexports-arrow-function-3
new file mode 100644
index 0000000000..333b6c6ff4
--- /dev/null
+++ b/t/t4018/javascript-module-dotexports-arrow-function-3
@@ -0,0 +1 @@
+module.exports.RIGHT = a => a+1; //ChangeMe
diff --git a/t/t4018/javascript-module-dotexports-assigned-function b/t/t4018/javascript-module-dotexports-assigned-function
new file mode 100644
index 0000000000..fc43431c77
--- /dev/null
+++ b/t/t4018/javascript-module-dotexports-assigned-function
@@ -0,0 +1 @@
+module.exports.RIGHT = PreviousFunction; //ChangeMe
diff --git a/t/t4018/javascript-module-dotexports-async-arrow-function b/t/t4018/javascript-module-dotexports-async-arrow-function
new file mode 100644
index 0000000000..b7e3341c93
--- /dev/null
+++ b/t/t4018/javascript-module-dotexports-async-arrow-function
@@ -0,0 +1,3 @@
+module.exports.RIGHT = async (a, b) => {
+    return a + b; // ChangeMe
+};
diff --git a/t/t4018/javascript-module-dotexports-async-arrow-function-2 b/t/t4018/javascript-module-dotexports-async-arrow-function-2
new file mode 100644
index 0000000000..715d3e9560
--- /dev/null
+++ b/t/t4018/javascript-module-dotexports-async-arrow-function-2
@@ -0,0 +1,4 @@
+module.exports.RIGHT = async a => {
+    
+    return a + 1; // ChangeMe
+};
diff --git a/t/t4018/javascript-module-dotexports-async-arrow-function-3 b/t/t4018/javascript-module-dotexports-async-arrow-function-3
new file mode 100644
index 0000000000..3a8ec728a9
--- /dev/null
+++ b/t/t4018/javascript-module-dotexports-async-arrow-function-3
@@ -0,0 +1 @@
+module.exports.RIGHT = async a => a + 1; // ChangeMe
diff --git a/t/t4018/javascript-module-dotexports-async-function b/t/t4018/javascript-module-dotexports-async-function
new file mode 100644
index 0000000000..b931331c1b
--- /dev/null
+++ b/t/t4018/javascript-module-dotexports-async-function
@@ -0,0 +1,4 @@
+module.exports.RIGHT = async function ChangeMe(a, b) {
+    
+    return a + b; // ChangeMe
+}
diff --git a/t/t4018/javascript-module-dotexports-async-generator-anonymous-function b/t/t4018/javascript-module-dotexports-async-generator-anonymous-function
new file mode 100644
index 0000000000..66e0acf178
--- /dev/null
+++ b/t/t4018/javascript-module-dotexports-async-generator-anonymous-function
@@ -0,0 +1,5 @@
+module.exports.RIGHT = async function* () {
+    
+    yield 1;
+    yield 2; // ChangeMe
+};
diff --git a/t/t4018/javascript-module-dotexports-async-generator-anonymous-function-2 b/t/t4018/javascript-module-dotexports-async-generator-anonymous-function-2
new file mode 100644
index 0000000000..c1cc0c1fce
--- /dev/null
+++ b/t/t4018/javascript-module-dotexports-async-generator-anonymous-function-2
@@ -0,0 +1,5 @@
+module.exports.RIGHT = async function *() {
+    
+    yield 1;
+    yield 2; // ChangeMe
+};
diff --git a/t/t4018/javascript-module-dotexports-async-generator-function b/t/t4018/javascript-module-dotexports-async-generator-function
new file mode 100644
index 0000000000..9e1dbb5b65
--- /dev/null
+++ b/t/t4018/javascript-module-dotexports-async-generator-function
@@ -0,0 +1,5 @@
+module.exports.RIGHT = async function* ChangeMe() {
+    
+    yield 1;
+    yield 2;
+}
diff --git a/t/t4018/javascript-module-dotexports-async-generator-function-2 b/t/t4018/javascript-module-dotexports-async-generator-function-2
new file mode 100644
index 0000000000..c886c6357b
--- /dev/null
+++ b/t/t4018/javascript-module-dotexports-async-generator-function-2
@@ -0,0 +1,5 @@
+module.exports.RIGHT = async function *ChangeMe() {
+    
+    yield 1;
+    yield 2;
+}
diff --git a/t/t4018/javascript-module-dotexports-function b/t/t4018/javascript-module-dotexports-function
new file mode 100644
index 0000000000..6b30d5ea98
--- /dev/null
+++ b/t/t4018/javascript-module-dotexports-function
@@ -0,0 +1,4 @@
+module.exports.RIGHT = function ChangeMe(a, b) {
+    
+    return a + b; 
+};
diff --git a/t/t4018/javascript-module-dotexports-generator-anonymous-function b/t/t4018/javascript-module-dotexports-generator-anonymous-function
new file mode 100644
index 0000000000..c77f32ac64
--- /dev/null
+++ b/t/t4018/javascript-module-dotexports-generator-anonymous-function
@@ -0,0 +1,5 @@
+module.exports.RIGHT = function* () {
+    
+    yield 1;
+    yield 2; // ChangeMe
+}
diff --git a/t/t4018/javascript-module-dotexports-generator-anonymous-function-2 b/t/t4018/javascript-module-dotexports-generator-anonymous-function-2
new file mode 100644
index 0000000000..318be0c172
--- /dev/null
+++ b/t/t4018/javascript-module-dotexports-generator-anonymous-function-2
@@ -0,0 +1,5 @@
+module.exports.RIGHT = function *() {
+    
+    yield 1;
+    yield 2; // ChangeMe
+};
diff --git a/t/t4018/javascript-module-dotexports-generator-function b/t/t4018/javascript-module-dotexports-generator-function
new file mode 100644
index 0000000000..839a6f16dc
--- /dev/null
+++ b/t/t4018/javascript-module-dotexports-generator-function
@@ -0,0 +1,5 @@
+module.exports.RIGHT = function* ChangeMe() {
+
+    yield 1;
+    yield 2;
+}
\ No newline at end of file
diff --git a/t/t4018/javascript-module-dotexports-generator-function-2 b/t/t4018/javascript-module-dotexports-generator-function-2
new file mode 100644
index 0000000000..a70100a26b
--- /dev/null
+++ b/t/t4018/javascript-module-dotexports-generator-function-2
@@ -0,0 +1,5 @@
+module.exports.RIGHT = function *ChangeMe() {
+
+    yield 1;
+    yield 2;
+}
-- 
2.50.0.rc0.62.g658f0ae201.dirty