test(e2e): avoid relying on CDN + reduce debounce delay

This commit is contained in:
Evan You
2019-12-11 10:37:03 -05:00
parent 4d730f464d
commit b983c68575
8 changed files with 30 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
<script src="https://unpkg.com/marked@0.3.6"></script>
<script src="https://unpkg.com/lodash@4.16.0"></script>
<script src="../../../../node_modules/marked/marked.min.js"></script>
<script src="../../../../node_modules/lodash/lodash.min.js"></script>
<script src="../../dist/vue.global.js"></script>
<div id="editor">
@@ -8,13 +8,14 @@
</div>
<script>
const delay = window.location.hash === '#test' ? 16 : 300
const { ref, computed } = Vue
const App = {
setup() {
const input = ref('# hello')
const output = computed(() => marked(input.value, { sanitize: true }))
const update = _.debounce(e => { input.value = e.target.value }, 300)
const update = _.debounce(e => { input.value = e.target.value }, delay)
return {
input,

View File

@@ -1,5 +1,5 @@
<script src="../../dist/vue.global.js"></script>
<link rel="stylesheet" href="https://unpkg.com/todomvc-app-css/index.css">
<link rel="stylesheet" href="../../../../node_modules/todomvc-app-css/index.css">
<div id="app">
<section class="todoapp">