updated test to create crazy value on runtime instead

pull/7663/head
Mathias Picker 4 years ago
parent 4e96893bf8
commit 2453bf948e

@ -1,11 +0,0 @@
export default {
skip_if_hydrate_from_ssr: true,
skip_if_hydrate: true,
skip_if_ssr: true,
test({ assert, target }) {
const input = target.querySelector('input');
const one_million = 1000000
assert.equal(input.value.length > one_million, true);
}
};

File diff suppressed because one or more lines are too long

@ -0,0 +1,18 @@
const create_random_character = () => String.fromCharCode(Math.floor(Math.random() * (126 - 35)) + 35);
const one_million = 1000000;
const crazy_value = Array.from({ length: one_million }, create_random_character).join('');
export default {
skip_if_hydrate_from_ssr: true,
skip_if_hydrate: true,
skip_if_ssr: true,
props: {
value: crazy_value
},
test({ assert, target }) {
const input = target.querySelector('input');
assert.equal(input.value.length === one_million, true);
}
};

@ -0,0 +1,5 @@
<script>
export let value;
</script>
<input type="text" {value} />

@ -1,10 +0,0 @@
export default {
skip_if_hydrate_from_ssr: true,
skip_if_hydrate: true,
skip_if_ssr: true,
test({ assert, target }) {
const image = target.querySelector('image');
assert.equal(image.tagName, 'IMAGE');
}
};

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 1.6 MiB

@ -1,11 +0,0 @@
export default {
skip_if_hydrate_from_ssr: true,
skip_if_hydrate: true,
skip_if_ssr: true,
test({ assert, target }) {
const textarea = target.querySelector('textarea');
const one_million = 1000000
assert.equal(textarea.value.length > one_million, true);
}
};

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save