[gjs/ewlsh/refactor-argv] Add tests for 'System.programArgs'




commit f76a1db6e7be58a98fcd4c7b4158c398cae7a4cf
Author: Evan Welsh <contact evanwelsh com>
Date:   Sun Jan 31 17:26:54 2021 -0800

    Add tests for 'System.programArgs'

 installed-tests/js/testSystem.js | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/installed-tests/js/testSystem.js b/installed-tests/js/testSystem.js
index 9cd5b8ef..b5b57058 100644
--- a/installed-tests/js/testSystem.js
+++ b/installed-tests/js/testSystem.js
@@ -55,3 +55,13 @@ describe('System.dumpHeap()', function () {
         expect(() => System.dumpHeap('/does/not/exist')).toThrow();
     });
 });
+
+describe('System.programArgs', function () {
+    it('System.programArgs is equal to ARGV', function () {
+        expect(System.programArgs).toEqual(ARGV);
+    });
+
+    it('System.programArgs is an array', function () {
+        expect(Array.isArray(System.programArgs)).toBeTruthy();
+    });
+});


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]