aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorache <ache@ache.one>2018-02-08 21:54:47 +0100
committerache <ache@ache.one>2018-02-08 21:54:47 +0100
commit32bc4a800e46631047a4ef9629c0e99fdcaca53d (patch)
treedf30b3b9b7d5eb21cc528d9cd1bf6c517b442259
parentPass every test (diff)
Add new tests
-rw-r--r--__tests__/index.js42
1 files changed, 24 insertions, 18 deletions
diff --git a/__tests__/index.js b/__tests__/index.js
index 1d54f2a..805ba42 100644
--- a/__tests__/index.js
+++ b/__tests__/index.js
@@ -50,51 +50,57 @@ test('line-input-empty-raw', t => {
});
test('line-input-id', t => {
- const {contents} = render('[__here__]{#unicorn}');
- t.is(contents, '<p><input id="unicorn" type="text" placeholder="here"></p>');
+ const {contents} = render('[__Some text__]{#unicorn}');
+ t.is(contents, '<p><input id="unicorn" type="text" placeholder="Some text"></p>');
});
test('line-input-class', t => {
- const {contents} = render('[__here__]{.unicorn}');
- t.is(contents, '<p><input class="unicorn" type="text" placeholder="here"></p>');
+ const {contents} = render('[__panda__]{.unicorn}');
+ t.is(contents, '<p><input class="unicorn" type="text" placeholder="panda"></p>');
});
test('line-input-classes', t => {
- const {contents} = render('[__here__]{.unicorn .fox}');
- t.is(contents, '<p><input class="unicorn fox" type="text" placeholder="here"></p>');
+ const {contents} = render('[__strong unicorn__]{.unicorn .fox}');
+ t.is(contents, '<p><input class="unicorn fox" type="text" placeholder="strong unicorn"></p>');
});
test('line-input-key-value', t => {
- const {contents} = render('[__here__]{unicorn="horse + horn"}');
- t.is(contents, '<p><input type="text" unicorn="horse + horn" placeholder="here"></p>');
+ const {contents} = render('[__math exercice__]{unicorn="horse + horn"}');
+ t.is(contents, '<p><input type="text" unicorn="horse + horn" placeholder="math exercice"></p>');
});
test('line-input-overwrite-type', t => {
- const {contents} = render('[__here__]{type=buttom}');
- t.is(contents, '<p><input type="text" placeholder="here"></p>');
+ const {contents} = render('[__Good answer__]{type=buttom}');
+ t.is(contents, '<p><input type="text" placeholder="Good answer"></p>');
});
test('line-input-overwrite-placeholder', t => {
- const {contents} = render('[__here__]{placeholder=\'not here\'}');
- t.is(contents, '<p><input type="text" placeholder="here"></p>');
+ const {contents} = render('[__Please not a bad answer__]{placeholder=\'not here\'}');
+ t.is(contents, '<p><input type="text" placeholder="Please not a bad answer"></p>');
});
test('line-input-overwrite-class', t => {
- const {contents} = render('[__here__]{class=\'unicorn\' .fox}');
- t.is(contents, '<p><input class="fox" type="text" placeholder="here"></p>');
+ const {contents} = render('[__A result__]{class=\'unicorn\' .fox}');
+ t.is(contents, '<p><input class="fox" type="text" placeholder="A result"></p>');
});
test('line-input-overwrite-id', t => {
- const {contents} = render('[__here__]{id=unicorn #fox}');
- t.is(contents, '<p><input id="fox" type="text" placeholder="here"></p>');
+ const {contents} = render('[__email__]{id=unicorn #fox}');
+ t.is(contents, '<p><input id="fox" type="text" placeholder="email"></p>');
});
test('line-input-multi-id', t => {
- const {contents} = render('[__here__]{#unicorn #fox}');
- t.is(contents, '<p><input id="unicorn" type="text" placeholder="here"></p>');
+ const {contents} = render('[__Login__]{#unicorn #fox}');
+ t.is(contents, '<p><input id="unicorn" type="text" placeholder="Login"></p>');
});
test('line-input-raw', t => {
const {contents} = renderRaw(file(join(__dirname, 'input-raw.md')));
t.snapshot(contents);
});
+
+test('line-input-password', t => {
+ const {contents} = render('[__Password__]{#passwd type=password}');
+ t.is(contents, '<p><input id="passwd" type="password" placeholder="Password"></p>');
+});
+