summaryrefslogtreecommitdiff
path: root/test/es-module/test-esm-forbidden-globals.mjs
blob: 2f1914e48631b5fcc20adbd82ff11491ec045e9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import '../common/index.mjs';

// eslint-disable-next-line no-undef
if (typeof arguments !== 'undefined') {
  throw new Error('not an ESM');
}
if (typeof this !== 'undefined') {
  throw new Error('not an ESM');
}
if (typeof exports !== 'undefined') {
  throw new Error('not an ESM');
}
if (typeof require !== 'undefined') {
  throw new Error('not an ESM');
}
if (typeof module !== 'undefined') {
  throw new Error('not an ESM');
}
if (typeof __filename !== 'undefined') {
  throw new Error('not an ESM');
}
if (typeof __dirname !== 'undefined') {
  throw new Error('not an ESM');
}