mirror of
https://github.com/yt-dlp/yt-dlp
synced 2025-07-13 09:07:41 -05:00
[jsinterp, extractor/youtube] Minor fixes
This commit is contained in:
@ -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; }
|
||||
''')
|
||||
|
Reference in New Issue
Block a user