Skip to content
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

feat: Run specific seed file (closes #801) #3335

Merged
merged 2 commits into from Jul 7, 2019

Conversation

felixmosh
Copy link
Contributor

@felixmosh felixmosh commented Jul 6, 2019

This features allows to run a specific seed file.
It adds an additional cli property --specific=filename.js which points to some seed file in the seed directory.

usage: npx knex seed:run --specific=seed-filename.js

return knex.seed
.run({ directory: 'test/integration/seed/test' })
.then(([data]) => {
expect(path.basename(data[0])).to.equal('seed1.js');
expect(path.basename(data[1])).to.equal('seed2.js');
});
});

it('should run specific seed file in the configured seed directory', () => {
Copy link
Collaborator

@kibertoad kibertoad Jul 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

async-await is preferable for new tests

Copy link
Contributor Author

@felixmosh felixmosh Jul 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@kibertoad
Copy link
Collaborator

@kibertoad kibertoad commented Jul 6, 2019

Could you please also create documentation pr in knex documentation repo?

@felixmosh
Copy link
Contributor Author

@felixmosh felixmosh commented Jul 6, 2019

Could you please also create documentation pr in knex documentation repo?

I've added the additional "sections" in the documentation, but when run dev / build and serving the docs, I don't see the additions even though I do see the additions in the source code of the html.

Any help?

@felixmosh
Copy link
Contributor Author

@felixmosh felixmosh commented Jul 6, 2019

Ok, managed to fix the issue, apparently there is mssql deps without it to be in package.json.

Added: knex/documentation#213

@kibertoad kibertoad merged commit 8b31a43 into knex:master Jul 7, 2019
2 checks passed
@kibertoad
Copy link
Collaborator

@kibertoad kibertoad commented Jul 7, 2019

Thank you!

felixmosh added a commit to felixmosh/knex that referenced this issue Jul 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants