I am experimenting with gleam in a javascript app. I am using the npm packages vite-gleam and ts-gleam for that (but I hope/think that should not matter for the sake of gleam test?)
so I have this directory setup:
tree . --gitignore
.
├── README.md
├── eslint.config.js
├── gleam.toml
├── manifest.toml
├── package.json
├── pnpm-lock.yaml
├── postcss.config.js
├── src
│ ├── app.css
│ ├── app.d.ts
│ ├── app.html
│ ├── g_kod.gleam
│ ├── g_kod_test.gleam
│ ├── index.test.ts
│ ├── lib
│ │ └── index.ts
│ └── routes
│ ├── +layout.svelte
│ ├── +layout.ts
│ └── +page.svelte
├── static
│ └── favicon.png
├── svelte.config.js
├── tailwind.config.ts
├── tsconfig.json
└── vite.config.ts
when I run gleam test I get:
gleam test
Compiled in 0.01s
Running g_kod_test.main
node:internal/fs/promises:945
const result = await PromisePrototypeThen(
^
Error: ENOENT: no such file or directory, scandir 'test'
at async readdir (node:internal/fs/promises:945:18)
at async gleamFiles (file:///Users/s0001325/repos/g-kod/build/dev/javascript/gleeunit/gleeunit_ffi.mjs:2:21)
at async main (file:///Users/s0001325/repos/g-kod/build/dev/javascript/gleeunit/gleeunit_ffi.mjs:32:18) {
errno: -2,
code: 'ENOENT',
syscall: 'scandir',
path: 'test'
}
Node.js v20.14.0
I am not really sure what's going on here.
first off, why is the node version printed? is node used to run the generated javascript code?
second, is there a certain directory structure that I am supposed to follow? is that why I see this error?
thanks!