Skip to content

Commit

Permalink
Fix completed migration listing
Browse files Browse the repository at this point in the history
Fixes #4951
  • Loading branch information
santialbo committed Mar 14, 2022
1 parent 1ce659f commit 3659733
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion bin/utils/migrationsLister.js
Expand Up @@ -14,7 +14,7 @@ function listMigrations(completed, newMigrations) {

for (let i = 0; i < completed.length; i++) {
const file = completed[i];
message += color.cyan(`${file} \n`);
message += color.cyan(`${file.name} \n`);
}
}

Expand Down
21 changes: 11 additions & 10 deletions test/jake/jakelib/migrate-test.js
Expand Up @@ -665,11 +665,12 @@ test('migrate:list prints migrations both completed and pending', async (temp) =

assert.include(
migrationsListResult.stdout,
`Found 1 Completed Migration file/files.`
);
assert.include(
migrationsListResult.stdout,
`Found 1 Pending Migration file/files.`
[
`Found 1 Completed Migration file/files.`,
`${migrationFile1} `,
`Found 1 Pending Migration file/files.`,
`${migrationFile2} `,
].join('\n')
);

const migrationUp2Result = await assertExec(
Expand All @@ -694,11 +695,11 @@ test('migrate:list prints migrations both completed and pending', async (temp) =

assert.include(
migrationsList2Result.stdout,
`Found 2 Completed Migration file/files.`
);
assert.include(
migrationsList2Result.stdout,
`No Pending Migration files Found.`
[
`Found 2 Completed Migration file/files.`,
`${migrationFile1} `,
`${migrationFile2} ``No Pending Migration files Found.`,
].join('\n')
);
});

Expand Down

0 comments on commit 3659733

Please sign in to comment.