0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 23:16:30 +01:00
nodejs/test/wpt/test-url.js
Joyee Cheung 890223dede
src: expose DOMException to internalBinding('message') for testing
Instead of using a hack to get it in the test.

PR-URL: https://github.com/nodejs/node/pull/28072
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-09 19:51:30 +02:00

21 lines
537 B
JavaScript

'use strict';
// Flags: --expose-internals
require('../common');
const { WPTRunner } = require('../common/wpt');
const { internalBinding } = require('internal/test/binding');
const { DOMException } = internalBinding('messaging');
const runner = new WPTRunner('url');
// Copy global descriptors from the global object
runner.copyGlobalsFromObject(global, ['URL', 'URLSearchParams']);
// Needed by urlsearchparams-constructor.any.js
runner.defineGlobal('DOMException', {
get() {
return DOMException;
}
});
runner.runJsTests();