Introduce Metro device and plugin
Summary: Introduced Metro device and the possibility to directly connect to running Metro instances Reviewed By: jknoxville Differential Revision: D19445623 fbshipit-source-id: 31978d966a56007c48f795076d6651e23de0e38d
This commit is contained in:
committed by
Facebook Github Bot
parent
014524ec26
commit
437ec11ca7
@@ -127,3 +127,19 @@ test('selectPlugin sets deepLinkPayload correctly', () => {
|
||||
);
|
||||
expect(state.deepLinkPayload).toBe('myPayload');
|
||||
});
|
||||
|
||||
test('UNREGISTER_DEVICE removes device', () => {
|
||||
const device = new BaseDevice('serial', 'physical', 'title', 'Android');
|
||||
const initialState: State = reducer(undefined, {
|
||||
type: 'REGISTER_DEVICE',
|
||||
payload: new BaseDevice('serial', 'physical', 'title', 'Android'),
|
||||
});
|
||||
|
||||
expect(initialState.devices).toEqual([device]);
|
||||
const endState = reducer(initialState, {
|
||||
type: 'UNREGISTER_DEVICES',
|
||||
payload: new Set(['serial']),
|
||||
});
|
||||
|
||||
expect(endState.devices).toEqual([]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user