Add more detailed errors for assertConnected
Differential Revision: D39383946 fbshipit-source-id: e11a29c77c5abe7f3fee5e979c596efd31ef4ec2
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d2ce30942f
commit
a9fe381076
@@ -166,7 +166,9 @@ test('a plugin cannot send messages after being disconnected', async () => {
|
||||
await instance.getCurrentState();
|
||||
} catch (e) {
|
||||
threw = true; // for some weird reason expect(async () => instance.getCurrentState()).toThrow(...) doesn't work today...
|
||||
expect(e).toMatchInlineSnapshot(`[Error: Plugin is not connected]`);
|
||||
expect(e).toMatchInlineSnapshot(
|
||||
`[Error: SandyPluginInstance.assertConnected -> plugin is not connected]`,
|
||||
);
|
||||
}
|
||||
expect(threw).toBeTruthy();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user