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
#3751: Esm interop flag #3616
#3751: Esm interop flag #3616
Conversation
Enable esm interop behind a flag Enable experimental, optional use Minimum changes Tests: migration/seeds/configuration fix: eslint error
return assertExec( | ||
`node ${KNEX} --esm migrate:latest --knexfile=test/jake-util/knexfile-esm/knexfile.js --knexpath=../knex.js` | ||
).then(({ stdout }) => { | ||
assert.include(stdout, 'Batch 1 run: 1 migrations'); |
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.
cli-testlab 1.10.0
supports multiple assertions, so if you bump dependency, you can do
return assertExec(
`node ${KNEX} --esm migrate:latest --knexfile=test/jake-util/knexfile-esm/knexfile.js --knexpath=../knex.js`, {
expectedOutput: ['Batch 1 run: 1 migrations', 'one.js']
}
)
`node ${KNEX} --esm seed:run --knexfile=test/jake-util/knexfile-esm/knexfile.js` | ||
).then(({ stdout }) => { | ||
assert.include(stdout, 'Ran 1 seed files'); | ||
assert.notInclude(stdout, 'first.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.
you can use notExpectedOutput
and expectedOutput
params for assertExec
to avoid then
chaining
Thanks! There are tiny little things left, and then this can be merged :) |
Could you also please submit a PR with documentation for this on https://github.com/knex/documentation? |
Thanks, |
@D10221 oh, you are right, this particular file is not using cli-testlab yet, so please ignore that comment, I'll refactor myself later. |
Thanks. |
Released in 0.20.8 |
Enable esm interop behind a flag
Enable experimental, optional use
Minimum changes
Tests: migration/seeds/configuration
fix: eslint error