Add test for pluginStates

Summary:
It's not super useful, to be honest, but it's to have one
open source `.node.js` test in place so `yarn test` doesn't
error out.

Reviewed By: danielbuechele

Differential Revision: D10217530

fbshipit-source-id: c0e17e48782174b856ef6d5fe94c5c042564e4f5
This commit is contained in:
Pascal Hartig
2018-10-09 03:51:28 -07:00
committed by Facebook Github Bot
parent b95a487748
commit 2c67546ad1

View File

@@ -0,0 +1,16 @@
/**
* Copyright 2018-present Facebook.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* @format
*/
import {default as reducer, setPluginState} from '../pluginStates';
test('reduce setPluginState', () => {
const res = reducer(
{},
setPluginState({pluginKey: 'myPlugin', state: {a: 1}}),
);
expect(res).toEqual({myPlugin: {a: 1}});
});