import assert from 'assert';
import jsdom from 'mocha-jsdom';
import simpleFormCreator from '../src/index.js';

describe('Simple Form Creator', function () {
	jsdom();

	it('should create an expected DOM node', function () {
		const simpleform = simpleFormCreator({ 'formId': 'randomId' });
		assert.equal(simpleform.outerHTML, '<form id="randomId" action="" method="post"></form>');
	});

	it('should have an id attribute', function () {
		const simpleform = simpleFormCreator({});
		assert.equal(typeof simpleform.getAttribute('id'), 'string');
	});

	it('should have an action attribute', function () {
		const simpleform = simpleFormCreator({});
		assert.equal(typeof simpleform.getAttribute('action'), 'string');
	});

	it('should have a method attribute', function () {
		const simpleform = simpleFormCreator({});
		assert.equal(typeof simpleform.getAttribute('method'), 'string');
	});
});

@@ -299,16 +299,20 @@
 t.equal(
+%0A%09%09%09
 simplefo
@@ -324,17 +324,20 @@
 terHTML,
- 
+%0A%09%09%09
 '%3Cform i
@@ -372,16 +372,46 @@
 d=%22post%22
+ style=%22%22%3E%3Cinput type=%22submit%22
 %3E%3C/form%3E
@@ -411,16 +411,19 @@
 %3C/form%3E'
+%0A%09%09
 );%0A%09%7D);%0A

Fix tests