-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
14 additions
and
9 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
node_modules | ||
coverage | ||
node_modules/ | ||
coverage/ | ||
swagger.json |
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,5 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`rdme login should post to /login on the API 1`] = `"Successfully logged in as [email protected] to the subdomain project."`; | ||
|
||
exports[`rdme login should send 2fa token if provided 1`] = `"Successfully logged in as [email protected] to the subdomain project."`; |
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 |
---|---|---|
|
@@ -34,9 +34,7 @@ describe('rdme login', () => { | |
|
||
const mock = nock(config.get('host')).post('/api/v1/login', { email, password, project }).reply(200, { apiKey }); | ||
|
||
const output = await cmd.run({ email, password, project }); | ||
expect(output).toContain('[email protected]'); | ||
expect(output).toContain('subdomain'); | ||
await expect(cmd.run({ email, password, project })).resolves.toMatchSnapshot(); | ||
|
||
mock.done(); | ||
|
||
|
@@ -81,10 +79,7 @@ describe('rdme login', () => { | |
.post('/api/v1/login', { email, password, project, token }) | ||
.reply(200, { apiKey: '123' }); | ||
|
||
const output = await cmd.run({ email, password, project, token }); | ||
expect(output).toContain('[email protected]'); | ||
expect(output).toContain('subdomain'); | ||
|
||
await expect(cmd.run({ email, password, project, token })).resolves.toMatchSnapshot(); | ||
mock.done(); | ||
}); | ||
|
||
|
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 |
---|---|---|
@@ -1 +1,5 @@ | ||
// The `chalk` and `colors` libraries have trouble with Jest sometimes in test snapshots so we're disabling | ||
// colorization here for all tests. | ||
process.env.FORCE_COLOR = 0; | ||
|
||
process.env.NODE_ENV = 'testing'; |