test: skip remote module related tests when enable_remote_module = false (#23557)

This commit is contained in:
Milan Burda 2020-05-13 20:05:44 +02:00 committed by GitHub
parent 85fae67966
commit fc468cce3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 13 deletions

View file

@ -6,6 +6,8 @@ delete window.Buffer;
delete global.Buffer;
// Test that remote.js doesn't use Buffer global
remote.require(path.join(__dirname, 'print_name.js')).echo(Buffer.from('bar'));
if (remote) {
remote.require(path.join(__dirname, 'print_name.js')).echo(Buffer.from('bar'));
}
window.test = Buffer.from('buffer');