Skip to content

Commit c6bafe5

Browse files
committed
Improved test setup
Signed-off-by: Jaid <jaid.jsx@gmail.com>
1 parent d960958 commit c6bafe5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/index.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import path from "path"
22

3-
const indexModule = (process.env.MAIN ? path.resolve(process.env.MAIN) : path.join(__dirname, "..", "src")) |> require
4-
const {default: arrayToObjectKeys} = indexModule
3+
const indexModule = (process.env.MAIN ? path.resolve(__dirname, "..", process.env.MAIN) : path.join(__dirname, "..", "src"))
4+
const {default: arrayToObjectKeys} = require(indexModule)
55

66
it("should run with 1 argument", () => {
77
const result = arrayToObjectKeys(["a", "b"])

0 commit comments

Comments
 (0)