From d81ba7d491bf2c89246d8817438db48a5a4e4ae9 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Tue, 30 Aug 2022 17:23:59 +0530 Subject: [jsinterp, extractor/youtube] Minor fixes --- test/test_jsinterp.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/test_jsinterp.py') 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 @@ -129,6 +129,11 @@ class TestJSInterpreter(unittest.TestCase): self.assertEqual(jsi.call_function('x'), [20, 20, 30, 40, 50]) 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; } ''') -- cgit v1.2.3