--require-main does not use --compilers flag
See original GitHub issueelectron-mocha --renderer -R spec --compilers js:babel-core/register --require-main test/setup/main.js test/*.spec.js
Throws Unexpected token import
.
Is there any way to enable babel compiler for main JS?
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Intel Compiler Flags : TechWeb
The Intel compilers optimization flags deliberately mimic many of those used with the GNU family of compilers. The basic optimization flags are summarized...
Read more >Understanding what flags to pass to the compiler
I can't seem to understand what flags should be passed to make this compile, let alone why. I understand that the headers aren't...
Read more >Use compiler flags for stack protection in GCC and Clang
Smash-stacking attacks are common, but the GCC and Clang compilers have a number of flags that can help defend against them.
Read more >Compilers — Agda 2.6.2.2 documentation
When the flag --ghc-strict is used the GHC backend generates mostly strict code. Note that functions might not be strict in unused arguments,...
Read more >CPP/C++ Compiler Flags and Options
1.1.1 General Compiler and Linker Flags · -nostartfiles => "Do not use the standard system startup files when linking. · -nodefaultlibs => Do...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The preload scripts are inserted in the renderer’s browser window using script tags before mocha runs; it’s intended mostly for people testing UMD modules or websites, not really for Electron apps. I don’t know what
ts-node/register
does, but if it hooks intorequire
for instance, it would certainly not convert your preload scripts.@inukshuk revisiting this problem once again after migrating to TypeScript. Basically here is what I do:
But
--preload
script does not execute, I’ve modified the code ofelectron-mocha
to print the options:Replacing
--preload
with--require
seem to fix this though.