Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/37529 Fixes: https://github.com/nodejs/node/issues/3462 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
19 lines
550 B
JavaScript
19 lines
550 B
JavaScript
'use strict';
|
|
|
|
require('../common');
|
|
const { WPTRunner } = require('../common/wpt');
|
|
|
|
const runner = new WPTRunner('html/webappapis/atob');
|
|
|
|
// Needed to access to DOMException.
|
|
runner.setFlags(['--expose-internals']);
|
|
|
|
// Set a script that will be executed in the worker before running the tests.
|
|
runner.setInitScript(`
|
|
const { internalBinding } = require('internal/test/binding');
|
|
const { atob, btoa } = require('buffer');
|
|
const { DOMException } = internalBinding('messaging');
|
|
global.DOMException = DOMException;
|
|
`);
|
|
|
|
runner.runJsTests();
|