aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_jsinterp.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2022-08-30 17:23:59 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2022-08-30 18:13:37 +0530
commitd81ba7d491bf2c89246d8817438db48a5a4e4ae9 (patch)
treea530e370d90289d3e23107328cb66a48b4ebb92c /test/test_jsinterp.py
parent5135ed3d4a87b3c03902aec68b60b40855b12863 (diff)
downloadhypervideo-pre-d81ba7d491bf2c89246d8817438db48a5a4e4ae9.tar.lz
hypervideo-pre-d81ba7d491bf2c89246d8817438db48a5a4e4ae9.tar.xz
hypervideo-pre-d81ba7d491bf2c89246d8817438db48a5a4e4ae9.zip
[jsinterp, extractor/youtube] Minor fixes
Diffstat (limited to 'test/test_jsinterp.py')
-rw-r--r--test/test_jsinterp.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/test_jsinterp.py b/test/test_jsinterp.py
index 863e52458..778607fb2 100644
--- a/test/test_jsinterp.py
+++ b/test/test_jsinterp.py
@@ -130,6 +130,11 @@ class TestJSInterpreter(unittest.TestCase):
def test_builtins(self):
jsi = JSInterpreter('''
+ function x() { return NaN }
+ ''')
+ self.assertTrue(math.isnan(jsi.call_function('x')))
+
+ jsi = JSInterpreter('''
function x() { return new Date('Wednesday 31 December 1969 18:01:26 MDT') - 0; }
''')
self.assertEqual(jsi.call_function('x'), 86000)