-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(app): do not set the user's Intercom name to "Unknown User"
Fixes #6461
- Loading branch information
Showing
6 changed files
with
85 additions
and
22 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
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,28 +1,50 @@ | ||
// @flow | ||
// config migration tests | ||
import { MOCK_CONFIG_V0, MOCK_CONFIG_V2 } from '../__fixtures__' | ||
import { | ||
MOCK_CONFIG_V0, | ||
MOCK_CONFIG_V1, | ||
MOCK_CONFIG_V2, | ||
MOCK_CONFIG_V3, | ||
} from '../__fixtures__' | ||
import { migrate } from '../migrate' | ||
|
||
describe('config migration', () => { | ||
it('should migrate version 0 to latest', () => { | ||
const v0Config = MOCK_CONFIG_V0 | ||
const result = migrate(v0Config) | ||
|
||
expect(result.version).toBe(2) | ||
expect(result).toEqual(MOCK_CONFIG_V2) | ||
expect(result.version).toBe(3) | ||
expect(result).toEqual(MOCK_CONFIG_V3) | ||
}) | ||
|
||
it('should keep version 2 unchanged', () => { | ||
const v2Config = { | ||
...MOCK_CONFIG_V2, | ||
calibration: { | ||
...MOCK_CONFIG_V2.calibration, | ||
useTrashSurfaceForTipCal: true, | ||
it('should migrate version 1 to latest', () => { | ||
const v1Config = MOCK_CONFIG_V1 | ||
const result = migrate(v1Config) | ||
|
||
expect(result.version).toBe(3) | ||
expect(result).toEqual(MOCK_CONFIG_V3) | ||
}) | ||
|
||
it('should migrate version 2 to latest', () => { | ||
const v2Config = MOCK_CONFIG_V2 | ||
const result = migrate(v2Config) | ||
|
||
expect(result.version).toBe(3) | ||
expect(result).toEqual(MOCK_CONFIG_V3) | ||
}) | ||
|
||
it('should keep version 3 unchanged', () => { | ||
const v3Config = { | ||
...MOCK_CONFIG_V3, | ||
support: { | ||
...MOCK_CONFIG_V3.support, | ||
name: 'Known Kname', | ||
email: '[email protected]', | ||
}, | ||
} | ||
const result = migrate(v2Config) | ||
const result = migrate(v3Config) | ||
|
||
expect(result.version).toBe(2) | ||
expect(result).toEqual(v2Config) | ||
expect(result.version).toBe(3) | ||
expect(result).toEqual(v3Config) | ||
}) | ||
}) |
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
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