diff --git a/src/components/Form/__snapshots__/test.js.snap b/src/components/Form/__snapshots__/test.js.snap
new file mode 100644
index 0000000..4e9f7b6
--- /dev/null
+++ b/src/components/Form/__snapshots__/test.js.snap
@@ -0,0 +1,46 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Form rendering 1`] = `
+
+`;
diff --git a/src/components/Form/test.js b/src/components/Form/test.js
new file mode 100644
index 0000000..1675607
--- /dev/null
+++ b/src/components/Form/test.js
@@ -0,0 +1,85 @@
+import React from 'react';
+import { shallow } from 'enzyme';
+
+import Form from 'components/Form';
+
+const syntaxList = [
+ { id: 'testJS', name: 'Testing JS' },
+ { id: 'other', name: 'Other' }
+];
+
+describe('Form', () => {
+ test('rendering', () => {
+ const component = shallow(
+
+ );
+ expect(component).toMatchSnapshot();
+ });
+
+ describe('submitting expression', () => {
+ test('submitting form', () => {
+ const onSubmit = jest.fn();
+ const component = shallow(
+
+ );
+
+ const exprInput = component.find('[name="expr"]');
+ const syntaxInput = component.find('[name="syntax"]');
+ exprInput.simulate('change', {
+ target: {
+ name: 'expr',
+ value: 'Test expression'
+ }
+ });
+ syntaxInput.simulate('change', {
+ target: {
+ name: 'syntax',
+ value: 'test'
+ }
+ });
+
+ const eventObj = { preventDefault: jest.fn() };
+ component.find('form').simulate('submit', eventObj);
+
+ expect(eventObj.preventDefault).toHaveBeenCalled();
+ expect(onSubmit).toHaveBeenCalledWith({
+ expr: 'Test expression',
+ syntax: 'test'
+ });
+ });
+
+ test('submitting form with Shift+Enter', () => {
+ const component = shallow(
+
+ );
+ const form = component.instance();
+ const eventObj = {
+ preventDefault: Function.prototype,
+ charCode: 13,
+ shiftKey: true
+ };
+ jest.spyOn(form, 'handleSubmit');
+ component.find('textarea').simulate('keypress', eventObj);
+
+ expect(form.handleSubmit).toHaveBeenCalled();
+ });
+
+ test('not submitting with just Enter', () => {
+ const component = shallow(
+
+ );
+ const form = component.instance();
+ const eventObj = {
+ preventDefault: Function.prototype,
+ charCode: 13,
+ shiftKey: false
+ };
+ jest.spyOn(form, 'handleSubmit');
+ component.find('textarea').simulate('keypress', eventObj);
+
+ expect(form.handleSubmit).not.toHaveBeenCalled();
+ });
+ });
+});