Has any way put comment on top of file?

Abstract

I use rescript-jest as test framework, and I want set testing environment per file, according this

But seems jest only recognize first line comment, the rescript compiled js file look like this:

image

When I delete first line manually, It’s work.

You can remove those comments with a compiler flag. Add this to your bsconfig.json:

"bsc-flags": ["-bs-no-version-header"]

See Old Docs.

5 Likes