/
githubmirror
/
node
Обзор
Документация
Войти
/
githubmirror
/
node
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
deps/v8/test/inspector/runtime/evaluate-repl-mode-side-effecting-array-join.js
32 строки
917 B
Michaël Zasso
deps: V8: cherry-pick 031b98b25cba
11 ноя 2022, 10:20
Не верифицирован
11 ноя 2022, 10:20
4107ce0
Код
Авторство
О чём код?
// Copyright 2022 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. let {Protocol} = InspectorTest.start( 'Tests that Runtime.evaluate with REPL mode correctly handles \ Array.prototype.join.'); Protocol.Runtime.enable(); (async function () { await evaluateReplWithSideEffects('a=[/a/]') await evaluateRepl('a.toString()'); await evaluateReplWithSideEffects('a.toString()'); InspectorTest.completeTest(); })(); async function evaluateRepl(expression) { InspectorTest.logMessage(await Protocol.Runtime.evaluate({ expression: expression, replMode: true, throwOnSideEffect: true })); } async function evaluateReplWithSideEffects(expression) { InspectorTest.logMessage(await Protocol.Runtime.evaluate({ expression: expression, replMode: true, throwOnSideEffect: false })); }