Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm test fails #543

Open
jkone27 opened this issue Jan 24, 2023 · 2 comments
Open

npm test fails #543

jkone27 opened this issue Jan 24, 2023 · 2 comments

Comments

@jkone27
Copy link

jkone27 commented Jan 24, 2023

npm test command fails after adding global.json to target NET6 (LTS) and adjusting fsproj test file to net6

Project and references (62 source files) parsed in 203ms

Loaded Feliz.HookAttribute from ../../../.nuget/packages/feliz.compilerplugins/1.10.0/lib/netstandard2.0/Feliz.CompilerPlugins.dll
Loaded Feliz.ReactComponentAttribute from ../../../.nuget/packages/feliz.compilerplugins/1.10.0/lib/netstandard2.0/Feliz.CompilerPlugins.dll
Loaded Feliz.ReactMemoComponentAttribute from ../../../.nuget/packages/feliz.compilerplugins/1.10.0/lib/netstandard2.0/Feliz.CompilerPlugins.dll
Started Fable compilation...
Fable compilation finished in 9932ms                                                


TypeError: Invalid host defined options
    at formattedImport (/Users/admin/Repositories/fable-tests/react-fsharp-feliz/node_modules/mocha/lib/esm-utils.js:6:23)
    at exports.requireOrImport (/Users/admin/Repositories/fable-tests/react-fsharp-feliz/node_modules/mocha/lib/esm-utils.js:23:14)
    at exports.loadFilesAsync (/Users/admin/Repositories/fable-tests/react-fsharp-feliz/node_modules/mocha/lib/esm-utils.js:33:34)
    at Mocha.loadFilesAsync (/Users/admin/Repositories/fable-tests/react-fsharp-feliz/node_modules/mocha/lib/mocha.js:431:19)
    at singleRun (/Users/admin/Repositories/fable-tests/react-fsharp-feliz/node_modules/mocha/lib/cli/run-helpers.js:125:15)
    at exports.runMocha (/Users/admin/Repositories/fable-tests/react-fsharp-feliz/node_modules/mocha/lib/cli/run-helpers.js:190:10)
    at exports.handler (/Users/admin/Repositories/fable-tests/react-fsharp-feliz/node_modules/mocha/lib/cli/run.js:362:11)
    at /Users/admin/Repositories/fable-tests/react-fsharp-feliz/node_modules/yargs/lib/command.js:241:49
    at process.runNextTicks [as _tickCallback] (node:internal/process/task_queues:60:5)
    at /Users/admin/Repositories/fable-tests/react-fsharp-feliz/node_modules/esm/esm.js:1:34535
    at /Users/admin/Repositories/fable-tests/react-fsharp-feliz/node_modules/esm/esm.js:1:34176
    at process.<anonymous> (/Users/admin/Repositories/fable-tests/react-fsharp-feliz/node_modules/esm/esm.js:1:34506)
    at Function.<anonymous> (/Users/admin/Repositories/fable-tests/react-fsharp-feliz/node_modules/esm/esm.js:1:296856)
    at Function.<anonymous> (/Users/admin/Repositories/fable-tests/react-fsharp-feliz/node_modules/esm/esm.js:1:296555)
    at Function.<anonymous> (/Users/admin/Repositories/fable-tests/react-fsharp-feliz/node_modules/esm/esm.js:1:284879)
    at Object.apply (/Users/admin/Repositories/fable-tests/react-fsharp-feliz/node_modules/esm/esm.js:1:199341)
    at node:internal/main/run_main_module:23:47

when i run npm test with NET6 (had to change it as was referencing NET5)

@jkone27
Copy link
Author

jkone27 commented Jan 24, 2023

seems related to this error: mochajs/mocha#4594. ?
is it possible to use jest instead of mocha?

@Zaid-Ajaj
Copy link
Owner

@jkone27 mocha probably needs an update. It is possible to use jest but favouring mocha because it runs the tests in the actual browser. That is when they used to work so I appreciate you looking into making it work again 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants