-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[chore] fix migration test linting #5901
Conversation
|
packages/migrate/migrations/routes/migrate_page_server/index.spec.js
Outdated
Show resolved
Hide resolved
packages/migrate/migrations/routes/migrate_page_server/index.spec.js
Outdated
Show resolved
Hide resolved
@@ -5,7 +5,7 @@ import { migrate_page_server } from './index.js'; | |||
|
|||
for (const sample of read_samples(import.meta.url)) { | |||
test(sample.description, () => { | |||
const actual = migrate_page_server(sample.before, sample.filename); | |||
const actual = migrate_page_server(sample.before, sample.filename ?? '+page.server.js'); |
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.
Should this defaulting be done inside the method? I.e. make the second parameter optional
Or should the samples all have a filename?
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.
this code is saying that all samples implicitly do have a filename, +page.server.js
, unless one is specified. making the parameter optional for the sake of the tests is the wrong solution
lint is failing on #5861. this should fix it