diff options
author | ache <ache@ache.one> | 2018-02-07 04:50:23 +0100 |
---|---|---|
committer | ache <ache@ache.one> | 2018-02-07 04:50:23 +0100 |
commit | f7f258b33a583d645e65aa37f386d217c2ebe4fd (patch) | |
tree | fbca797c6b29c5d3063b7d245e42ef42bd15df32 | |
parent | Make the tests (diff) |
Pass every test
-rw-r--r-- | __tests__/index.js | 2 | ||||
-rw-r--r-- | app.js | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/__tests__/index.js b/__tests__/index.js index ad27736..1d54f2a 100644 --- a/__tests__/index.js +++ b/__tests__/index.js @@ -66,7 +66,7 @@ test('line-input-classes', t => { test('line-input-key-value', t => { const {contents} = render('[__here__]{unicorn="horse + horn"}'); - t.is(contents, '<p><input unicorn="horse + horn" type="text" placeholder="here"></p>'); + t.is(contents, '<p><input type="text" unicorn="horse + horn" placeholder="here"></p>'); }); test('line-input-overwrite-type', t => { @@ -31,7 +31,7 @@ function parseHTMLparam(value, indexNext) { return eaten; }; - const prop = {key: undefined /* {} */, class: undefined /* [] */, id: undefined}; + const prop = {key: undefined /* {} */, class: undefined /* [] */, id: undefined, type: 'text'}; let type; while (value.charAt(indexNext) !== '}') { @@ -89,7 +89,7 @@ function parseHTMLparam(value, indexNext) { } switch (type) { case 'id': // ID - prop.id = labelFirst; + prop.id = prop.id || labelFirst; break; case 'class': if (!prop.class) { |