summaryrefslogtreecommitdiff
path: root/tests/loslib.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/loslib.js')
-rw-r--r--tests/loslib.js17
1 files changed, 5 insertions, 12 deletions
diff --git a/tests/loslib.js b/tests/loslib.js
index 2470359..83d6c81 100644
--- a/tests/loslib.js
+++ b/tests/loslib.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');
@@ -13,7 +11,7 @@ test('os.time', function (t) {
let luaCode = `
return os.time()
`, L;
-
+
t.plan(3);
t.doesNotThrow(function () {
@@ -36,7 +34,6 @@ test('os.time', function (t) {
lua.lua_isinteger(L, -1),
"Correct element(s) on the stack"
);
-
});
@@ -48,7 +45,7 @@ test('os.time (with format)', function (t) {
year = 2015
})
`, L;
-
+
t.plan(3);
t.doesNotThrow(function () {
@@ -72,7 +69,6 @@ test('os.time (with format)', function (t) {
new Date(2015, 1, 8, 12, 0, 0, 0).getTime() / 1000,
"Correct element(s) on the stack"
);
-
});
@@ -82,7 +78,7 @@ test('os.difftime', function (t) {
local t2 = os.time()
return os.difftime(t2, t1)
`, L;
-
+
t.plan(3);
t.doesNotThrow(function () {
@@ -105,7 +101,6 @@ test('os.difftime', function (t) {
lua.lua_isnumber(L, -1),
"Correct element(s) on the stack"
);
-
});
@@ -117,7 +112,7 @@ test('os.date', function (t) {
year = 2015
}))
`, L;
-
+
t.plan(3);
t.doesNotThrow(function () {
@@ -141,7 +136,6 @@ test('os.date', function (t) {
"2015-02-08",
"Correct element(s) on the stack"
);
-
});
@@ -149,7 +143,7 @@ test('os.getenv', function (t) {
let luaCode = `
return os.getenv('PATH')
`, L;
-
+
t.plan(3);
t.doesNotThrow(function () {
@@ -172,5 +166,4 @@ test('os.getenv', function (t) {
lua.lua_isstring(L, -1),
"Correct element(s) on the stack"
);
-
});