-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test for list without migrations
- Loading branch information
Showing
2 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
tap-snapshots/test-02-snapshot-bin-east-commands-list-withoutMigrations.js-TAP.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* IMPORTANT | ||
* This snapshot file is auto-generated, but designed for humans. | ||
* It should be checked into source control and tracked carefully. | ||
* Re-generate by setting TAP_SNAPSHOT=1 and running tests. | ||
* Make sure to inspect the output below. Do not ignore changes! | ||
*/ | ||
'use strict' | ||
exports[`test/02-snapshot/bin/east/commands/list/withoutMigrations.js TAP > output 1`] = ` | ||
there is no new migrations | ||
` |
49 changes: 49 additions & 0 deletions
49
test/02-snapshot/bin/east/commands/list/withoutMigrations.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
'use strict'; | ||
|
||
const tap = require('tap'); | ||
const expect = require('expect.js'); | ||
const testUtils = require('../../../../../../testUtils'); | ||
|
||
tap.mochaGlobals(); | ||
|
||
const binPath = testUtils.getBinPath('east'); | ||
const describeTitle = 'bin/east list without migrations'; | ||
|
||
describe(describeTitle, () => { | ||
let commandResult; | ||
let migrator; | ||
|
||
before(() => { | ||
return Promise.resolve() | ||
.then(() => testUtils.createMigrator({init: true})) | ||
.then((createdMigrator) => { | ||
migrator = createdMigrator; | ||
}); | ||
}); | ||
|
||
after(() => testUtils.destroyMigrator({migrator})); | ||
|
||
it('should be done without error', () => { | ||
const cwd = testUtils.getTestDirPath(); | ||
|
||
return Promise.resolve() | ||
.then(() => { | ||
return testUtils.execAsync( | ||
`"${binPath}" list`, | ||
{cwd} | ||
); | ||
}) | ||
.then((result) => { | ||
expect(result.stderr).not.ok(); | ||
|
||
commandResult = result; | ||
}); | ||
}); | ||
|
||
it('stdout should match expected snapshot', () => { | ||
tap.matchSnapshot( | ||
testUtils.cleanSnapshotData(commandResult.stdout), | ||
'output' | ||
); | ||
}); | ||
}); |