From 93badd25a7014667df21528478a5ced599a2e00d Mon Sep 17 00:00:00 2001 From: tigercosmos Date: Sun, 10 Mar 2024 18:52:22 +0900 Subject: [PATCH] setup tests for different platforms --- package.json | 3 ++- test/test_main.ps1 | 11 +++++++++++ test/test_main.sh | 11 +++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 test/test_main.ps1 create mode 100644 test/test_main.sh diff --git a/package.json b/package.json index 9dbb814..0348173 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "description": "The more powerful JavaScript logger for NodeJS and browsers.", "main": "index.js", "scripts": { - "test": "node test/test.js && LOGGER=info node test/test2.js && node test/test3.js && LOGGER=info node test/test4.js && LOGGER=info node test/test_stream.js" + "test": "./test/test_main.sh", + "test-windows": "powershell -File test/test_main.ps1" }, "repository": { "type": "git", diff --git a/test/test_main.ps1 b/test/test_main.ps1 new file mode 100644 index 0000000..d00629b --- /dev/null +++ b/test/test_main.ps1 @@ -0,0 +1,11 @@ +node test\test.js + +$env:LOGGER = "info" +node test\test2.js + +node test\test3.js + +$env:LOGGER = "info" +node test\test4.js + +node test\test_stream.js \ No newline at end of file diff --git a/test/test_main.sh b/test/test_main.sh new file mode 100644 index 0000000..5713f6b --- /dev/null +++ b/test/test_main.sh @@ -0,0 +1,11 @@ +#!/usr/bin/bash + +node test/test.js + +LOGGER=info node test/test2.js + +node test/test3.js + +LOGGER=info node test/test4.js + +node test/test_stream.js