mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 21:19:50 +01:00
3ab0499d43
PR-URL: https://github.com/nodejs/node/pull/53124 Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
20 lines
378 B
JavaScript
20 lines
378 B
JavaScript
// Flags: --experimental-permission --allow-fs-read=*
|
|
'use strict';
|
|
|
|
const common = require('../common');
|
|
const assert = require('node:assert');
|
|
|
|
const { WASI } = require('wasi');
|
|
|
|
{
|
|
assert.throws(() => {
|
|
new WASI({
|
|
version: 'preview1',
|
|
preopens: { '/': '/' },
|
|
});
|
|
}, common.expectsError({
|
|
code: 'ERR_ACCESS_DENIED',
|
|
permission: 'WASI',
|
|
}));
|
|
}
|