-
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.
fix: pulling some snapshots that have color in them as they're causin…
…g flaky tests
- Loading branch information
Showing
5 changed files
with
14 additions
and
35 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,7 +34,10 @@ describe('rdme login', () => { | |
|
||
const mock = nock(config.get('host')).post('/api/v1/login', { email, password, project }).reply(200, { apiKey }); | ||
|
||
await expect(cmd.run({ email, password, project })).resolves.toMatchSnapshot(); | ||
const output = await cmd.run({ email, password, project }); | ||
expect(output).toContain('[email protected]'); | ||
expect(output).toContain('subdomain'); | ||
|
||
mock.done(); | ||
|
||
expect(configStore.get('apiKey')).toBe(apiKey); | ||
|
@@ -78,7 +81,10 @@ describe('rdme login', () => { | |
.post('/api/v1/login', { email, password, project, token }) | ||
.reply(200, { apiKey: '123' }); | ||
|
||
await expect(cmd.run({ email, password, project, token })).resolves.toMatchSnapshot(); | ||
const output = await cmd.run({ email, password, project, token }); | ||
expect(output).toContain('[email protected]'); | ||
expect(output).toContain('subdomain'); | ||
|
||
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
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,4 +1 @@ | ||
// Chalk has 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'; |