Skip to content

Commit

Permalink
what fun
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Aug 15, 2022
1 parent 6c22129 commit e9342c7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { migrate_page } from './index.js';

for (const sample of read_samples(import.meta.url)) {
test(sample.description, () => {
const actual = migrate_page(sample.before);
const actual = migrate_page(sample.before, sample.filename ?? '+page.js');
assert.equal(actual, sample.after);
});
}
Expand Down
2 changes: 2 additions & 0 deletions packages/migrate/migrations/routes/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,9 @@ export function read_samples(test_file) {
* @param {string} new_type
*/
export function rewrite_type(node, code, old_type, new_type) {
// @ts-ignore
if (node.jsDoc) {
// @ts-ignore
for (const comment of node.jsDoc) {
const str = comment.getText();
const index = str.indexOf(old_type);
Expand Down

0 comments on commit e9342c7

Please sign in to comment.