summaryrefslogtreecommitdiff
path: root/test/fixtures/inspector-global-function.mjs
blob: b89808b88079bb3ef400c2b4f5ad34c01da860fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
'use strict';
let invocations = 0;
const interval = setInterval(() => {}, 1000);

global.sum = function() {
  const a = 1;
  const b = 2;
  const c = a + b;
  clearInterval(interval);
  console.log(invocations++, c);
};

// NOTE(mmarchini): Calls console.log two times to ensure we loaded every
// internal module before pausing. See
// https://bugs.chromium.org/p/v8/issues/detail?id=10287.
console.log('Loading');
console.log('Ready!');