Logo
Explore Help
Sign In
1berry/nodejs
1
0
Fork 0
You've already forked nodejs
Code Issues Packages Projects Releases Wiki Activity
nodejs/test/parallel/test-url-revokeobjecturl.js

15 lines
245 B
JavaScript
Raw Permalink Normal View History

url: throw error if argument length of revokeObjectURL is 0 Added a check to see if url wasn't included as an argument which will then throw an error. Fixes: https://github.com/nodejs/node/issues/50432 PR-URL: https://github.com/nodejs/node/pull/50433 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
2023-11-30 13:26:56 -08:00
'use strict';
require('../common');
// Test ensures that the function receives the url argument.
const assert = require('node:assert');
assert.throws(() => {
URL.revokeObjectURL();
}, {
code: 'ERR_MISSING_ARGS',
name: 'TypeError',
});
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 2119ms Template: 5ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API