From 382bfe27205d5ade172fa088fcab0b2e123838e4 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Sun, 10 Dec 2017 01:01:43 +1100 Subject: Use `typeof process === "undefined"` instead of WEB global This removes requirement to set global.WEB before requiring in node --- tests/test-suite/api.js | 2 -- tests/test-suite/attrib.js | 2 -- tests/test-suite/bitwise.js | 2 -- tests/test-suite/calls.js | 2 -- tests/test-suite/closure.js | 2 -- tests/test-suite/code.js | 2 -- tests/test-suite/constructs.js | 2 -- tests/test-suite/coroutine.js | 2 -- tests/test-suite/db.js | 2 -- tests/test-suite/errors.js | 2 -- tests/test-suite/events.js | 2 -- tests/test-suite/goto.js | 2 -- tests/test-suite/literals.js | 2 -- tests/test-suite/locals.js | 2 -- tests/test-suite/ltests.js | 2 -- tests/test-suite/math.js | 2 -- tests/test-suite/nextvar.js | 2 -- tests/test-suite/pm.js | 2 -- tests/test-suite/sort.js | 2 -- tests/test-suite/strings.js | 2 -- tests/test-suite/tpack.js | 2 -- tests/test-suite/utf8.js | 2 -- tests/test-suite/vararg.js | 2 -- 23 files changed, 46 deletions(-) (limited to 'tests/test-suite') diff --git a/tests/test-suite/api.js b/tests/test-suite/api.js index 8b59e9c..b5f45c3 100644 --- a/tests/test-suite/api.js +++ b/tests/test-suite/api.js @@ -2,8 +2,6 @@ const test = require('tape'); -global.WEB = false; - const lua = require('../../src/lua.js'); const lauxlib = require('../../src/lauxlib.js'); const lualib = require('../../src/lualib.js'); diff --git a/tests/test-suite/attrib.js b/tests/test-suite/attrib.js index d6c3803..fcd3271 100644 --- a/tests/test-suite/attrib.js +++ b/tests/test-suite/attrib.js @@ -2,8 +2,6 @@ const test = require('tape'); -global.WEB = false; - const lua = require('../../src/lua.js'); const lauxlib = require('../../src/lauxlib.js'); const lualib = require('../../src/lualib.js'); diff --git a/tests/test-suite/bitwise.js b/tests/test-suite/bitwise.js index 3969bb0..df57f15 100644 --- a/tests/test-suite/bitwise.js +++ b/tests/test-suite/bitwise.js @@ -2,8 +2,6 @@ const test = require('tape'); -global.WEB = false; - const lua = require('../../src/lua.js'); const lauxlib = require('../../src/lauxlib.js'); const lualib = require('../../src/lualib.js'); diff --git a/tests/test-suite/calls.js b/tests/test-suite/calls.js index 451f6c0..fdd5eac 100644 --- a/tests/test-suite/calls.js +++ b/tests/test-suite/calls.js @@ -2,8 +2,6 @@ const test = require('tape'); -global.WEB = false; - const lua = require('../../src/lua.js'); const lauxlib = require('../../src/lauxlib.js'); const lualib = require('../../src/lualib.js'); diff --git a/tests/test-suite/closure.js b/tests/test-suite/closure.js index 8e9e4b1..464a5b5 100644 --- a/tests/test-suite/closure.js +++ b/tests/test-suite/closure.js @@ -2,8 +2,6 @@ const test = require('tape'); -global.WEB = false; - const lua = require('../../src/lua.js'); const lauxlib = require('../../src/lauxlib.js'); const lualib = require('../../src/lualib.js'); diff --git a/tests/test-suite/code.js b/tests/test-suite/code.js index 4438cd2..26ca021 100644 --- a/tests/test-suite/code.js +++ b/tests/test-suite/code.js @@ -2,8 +2,6 @@ const test = require('tape'); -global.WEB = false; - const lua = require('../../src/lua.js'); const lauxlib = require('../../src/lauxlib.js'); const lualib = require('../../src/lualib.js'); diff --git a/tests/test-suite/constructs.js b/tests/test-suite/constructs.js index 20a1210..f180195 100644 --- a/tests/test-suite/constructs.js +++ b/tests/test-suite/constructs.js @@ -2,8 +2,6 @@ const test = require('tape'); -global.WEB = false; - const lua = require('../../src/lua.js'); const lauxlib = require('../../src/lauxlib.js'); const lualib = require('../../src/lualib.js'); diff --git a/tests/test-suite/coroutine.js b/tests/test-suite/coroutine.js index 82f10a3..b85f0de 100644 --- a/tests/test-suite/coroutine.js +++ b/tests/test-suite/coroutine.js @@ -2,8 +2,6 @@ const test = require('tape'); -global.WEB = false; - const lua = require('../../src/lua.js'); const lauxlib = require('../../src/lauxlib.js'); const lualib = require('../../src/lualib.js'); diff --git a/tests/test-suite/db.js b/tests/test-suite/db.js index dcb57da..6d85a5f 100644 --- a/tests/test-suite/db.js +++ b/tests/test-suite/db.js @@ -2,8 +2,6 @@ const test = require('tape'); -global.WEB = false; - const lua = require('../../src/lua.js'); const lauxlib = require('../../src/lauxlib.js'); const lualib = require('../../src/lualib.js'); diff --git a/tests/test-suite/errors.js b/tests/test-suite/errors.js index 5980724..a6bc351 100644 --- a/tests/test-suite/errors.js +++ b/tests/test-suite/errors.js @@ -2,8 +2,6 @@ const test = require('tape'); -global.WEB = false; - const lua = require('../../src/lua.js'); const lauxlib = require('../../src/lauxlib.js'); const lualib = require('../../src/lualib.js'); diff --git a/tests/test-suite/events.js b/tests/test-suite/events.js index 0f94f36..9a15e93 100644 --- a/tests/test-suite/events.js +++ b/tests/test-suite/events.js @@ -2,8 +2,6 @@ const test = require('tape'); -global.WEB = false; - const lua = require('../../src/lua.js'); const lauxlib = require('../../src/lauxlib.js'); const lualib = require('../../src/lualib.js'); diff --git a/tests/test-suite/goto.js b/tests/test-suite/goto.js index c07541e..5acf633 100644 --- a/tests/test-suite/goto.js +++ b/tests/test-suite/goto.js @@ -2,8 +2,6 @@ const test = require('tape'); -global.WEB = false; - const lua = require('../../src/lua.js'); const lauxlib = require('../../src/lauxlib.js'); const lualib = require('../../src/lualib.js'); diff --git a/tests/test-suite/literals.js b/tests/test-suite/literals.js index d18d557..0078cf8 100644 --- a/tests/test-suite/literals.js +++ b/tests/test-suite/literals.js @@ -2,8 +2,6 @@ const test = require('tape'); -global.WEB = false; - const lua = require('../../src/lua.js'); const lauxlib = require('../../src/lauxlib.js'); const lualib = require('../../src/lualib.js'); diff --git a/tests/test-suite/locals.js b/tests/test-suite/locals.js index 3815f5d..cc82e38 100644 --- a/tests/test-suite/locals.js +++ b/tests/test-suite/locals.js @@ -2,8 +2,6 @@ const test = require('tape'); -global.WEB = false; - const lua = require('../../src/lua.js'); const lauxlib = require('../../src/lauxlib.js'); const lualib = require('../../src/lualib.js'); diff --git a/tests/test-suite/ltests.js b/tests/test-suite/ltests.js index 2f48287..67ab87d 100644 --- a/tests/test-suite/ltests.js +++ b/tests/test-suite/ltests.js @@ -1,7 +1,5 @@ "use strict"; -global.WEB = false; - const assert = require("assert"); const lua = require('../../src/lua.js'); diff --git a/tests/test-suite/math.js b/tests/test-suite/math.js index ea021d2..0052bc2 100644 --- a/tests/test-suite/math.js +++ b/tests/test-suite/math.js @@ -2,8 +2,6 @@ const test = require('tape'); -global.WEB = false; - const lua = require('../../src/lua.js'); const lauxlib = require('../../src/lauxlib.js'); const lualib = require('../../src/lualib.js'); diff --git a/tests/test-suite/nextvar.js b/tests/test-suite/nextvar.js index 28a54e7..ad75f93 100644 --- a/tests/test-suite/nextvar.js +++ b/tests/test-suite/nextvar.js @@ -2,8 +2,6 @@ const test = require('tape'); -global.WEB = false; - const lua = require('../../src/lua.js'); const lauxlib = require('../../src/lauxlib.js'); const lualib = require('../../src/lualib.js'); diff --git a/tests/test-suite/pm.js b/tests/test-suite/pm.js index 6b9c767..ae3512e 100644 --- a/tests/test-suite/pm.js +++ b/tests/test-suite/pm.js @@ -2,8 +2,6 @@ const test = require('tape'); -global.WEB = false; - const lua = require('../../src/lua.js'); const lauxlib = require('../../src/lauxlib.js'); const lualib = require('../../src/lualib.js'); diff --git a/tests/test-suite/sort.js b/tests/test-suite/sort.js index 0b13861..9cee400 100644 --- a/tests/test-suite/sort.js +++ b/tests/test-suite/sort.js @@ -2,8 +2,6 @@ const test = require('tape'); -global.WEB = false; - const lua = require('../../src/lua.js'); const lauxlib = require('../../src/lauxlib.js'); const lualib = require('../../src/lualib.js'); diff --git a/tests/test-suite/strings.js b/tests/test-suite/strings.js index c501ddd..50873e5 100644 --- a/tests/test-suite/strings.js +++ b/tests/test-suite/strings.js @@ -2,8 +2,6 @@ const test = require('tape'); -global.WEB = false; - const lua = require('../../src/lua.js'); const lauxlib = require('../../src/lauxlib.js'); const lualib = require('../../src/lualib.js'); diff --git a/tests/test-suite/tpack.js b/tests/test-suite/tpack.js index 0754532..ebce4e4 100644 --- a/tests/test-suite/tpack.js +++ b/tests/test-suite/tpack.js @@ -2,8 +2,6 @@ const test = require('tape'); -global.WEB = false; - const lua = require('../../src/lua.js'); const lauxlib = require('../../src/lauxlib.js'); const lualib = require('../../src/lualib.js'); diff --git a/tests/test-suite/utf8.js b/tests/test-suite/utf8.js index 2da2d4a..11f699d 100644 --- a/tests/test-suite/utf8.js +++ b/tests/test-suite/utf8.js @@ -2,8 +2,6 @@ const test = require('tape'); -global.WEB = false; - const lua = require('../../src/lua.js'); const lauxlib = require('../../src/lauxlib.js'); const lualib = require('../../src/lualib.js'); diff --git a/tests/test-suite/vararg.js b/tests/test-suite/vararg.js index f693870..dc90248 100644 --- a/tests/test-suite/vararg.js +++ b/tests/test-suite/vararg.js @@ -2,8 +2,6 @@ const test = require('tape'); -global.WEB = false; - const lua = require('../../src/lua.js'); const lauxlib = require('../../src/lauxlib.js'); const lualib = require('../../src/lualib.js'); -- cgit v1.2.3-54-g00ecf