]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: remove markdown spec debounce assertion for ci stability
authorEvan You <yyx990803@gmail.com>
Fri, 7 May 2021 13:05:19 +0000 (09:05 -0400)
committerEvan You <yyx990803@gmail.com>
Fri, 7 May 2021 13:08:10 +0000 (09:08 -0400)
packages/vue/examples/__tests__/markdown.spec.ts
packages/vue/examples/classic/markdown.html
packages/vue/examples/composition/markdown.html

index 32316e34a08795062d1839f6ec537fe9a06204ba..35df22a2570004d159de24242cad2a4b1f725ab6 100644 (file)
@@ -20,8 +20,11 @@ describe('e2e: markdown', () => {
     expect(await html('#editor div')).toBe('<h1 id="hello">hello</h1>\n')
 
     await page().type('textarea', '\n## foo\n\n- bar\n- baz')
+
     // assert the output is not updated yet because of debounce
-    expect(await html('#editor div')).toBe('<h1 id="hello">hello</h1>\n')
+    // debounce has become unstable on CI so this assertion is disabled
+    // expect(await html('#editor div')).toBe('<h1 id="hello">hello</h1>\n')
+
     await expectByPolling(
       () => html('#editor div'),
       '<h1 id="hello">hello</h1>\n' +
index 35ebcfb10d6adb9b1c34c421cee3afb4f46ab6c6..61e64f6e3cb567fdc72c50fc9d2df2f30b5746fa 100644 (file)
@@ -8,8 +8,6 @@
 </div>
 
 <script>
-const delay = window.location.hash === '#test' ? 16 : 500
-
 Vue.createApp({
   data: () => ({
     input: '# hello'
@@ -22,7 +20,7 @@ Vue.createApp({
   methods: {
     update: _.debounce(function (e) {
       this.input = e.target.value
-    }, delay)
+    }, 50)
   }
 }).mount('#editor')
 </script>
index 9a409e63f99fbaa180b308339dec6aa1707edd1b..8734cf6aed2272cbf593373a9a36236a851d3e1b 100644 (file)
@@ -8,14 +8,13 @@
 </div>
 
 <script>
-const delay = window.location.hash === '#test' ? 16 : 500
 const { ref, computed } = Vue
 
 Vue.createApp({
   setup() {
     const input = ref('# hello')
     const output = computed(() => marked(input.value, { sanitize: true }))
-    const update = _.debounce(e => { input.value = e.target.value }, delay)
+    const update = _.debounce(e => { input.value = e.target.value }, 50)
 
     return {
       input,