11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ciconst common = require('../../common'); 31cb0ef41Sopenharmony_ciconst assert = require('assert'); 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_ci// Testing handle scope api calls 61cb0ef41Sopenharmony_ciconst testHandleScope = 71cb0ef41Sopenharmony_ci require(`./build/${common.buildType}/test_handle_scope`); 81cb0ef41Sopenharmony_ci 91cb0ef41Sopenharmony_citestHandleScope.NewScope(); 101cb0ef41Sopenharmony_ci 111cb0ef41Sopenharmony_ciassert.ok(testHandleScope.NewScopeEscape() instanceof Object); 121cb0ef41Sopenharmony_ci 131cb0ef41Sopenharmony_citestHandleScope.NewScopeEscapeTwice(); 141cb0ef41Sopenharmony_ci 151cb0ef41Sopenharmony_ciassert.throws( 161cb0ef41Sopenharmony_ci () => { 171cb0ef41Sopenharmony_ci testHandleScope.NewScopeWithException(() => { throw new RangeError(); }); 181cb0ef41Sopenharmony_ci }, 191cb0ef41Sopenharmony_ci RangeError); 20