node/test/parallel/test-global-domexception.js
XadillaX e4b1fb5e64
lib: expose DOMException as global
Refs: https://github.com/nodejs/node/issues/39098

PR-URL: https://github.com/nodejs/node/pull/39176
Fixes: https://github.com/nodejs/node/issues/39098
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-08-06 12:45:14 -07:00

12 lines
194 B
JavaScript

'use strict';
require('../common');
const assert = require('assert');
assert.strictEqual(typeof DOMException, 'function');
assert.throws(() => {
atob('我要抛错!');
}, DOMException);