-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Move to ESM #338
Move to ESM #338
Conversation
import open from 'open' | ||
import {join} from 'path' | ||
import rm from 'size-limit/rm' | ||
import { afterEach, expect, it, vi } from "vitest" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you run Prettier on changed files?
I have it in VS Code. But you can install to the project, run, and uninstall.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, damn, I did eslint --fix
but forgot about prettier. I've installed it globally and ran pnpm exec prettier **/*.js --write
, should do the trick.
packages/esbuild/test/index.test.js
Outdated
}) | ||
|
||
describe('throws error on unknown entry', () => { | ||
it('should work with commonjs config', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it('should work with commonjs config', async () => { | |
it('works with commonjs config', async () => { |
and all other tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed by c17c150
#227
type: module
to all package.json filestype: module
in their respective package.json files it broke some tests, because the bundlers started treating the files as esm and not cjs like before. That's why I've split the fixtures directories and added package.json files to force the correct module type during bundling tests.import ... assert
syntaxNotes:
if (stmt) { it(...) }
toit.skipIf(!stmt)( ... )
so it looks a bit cleaner and the runner reports these tests as skipped