;((rc) => {
  'use strict';
  var tagContent = 'router2-content';
  var tagView = 'router2-view';

  var div = document.createElement('div');
  div.innerHTML = `
    <button>Test</button>
    <${tagContent} hash="a-hash-template" hidden>
      The content to render
    </${tagContent}>

    <${tagContent} hash="another-hash-template" hidden>
      This is another hash
    </${tagContent}>
  `;
  var script1 = document.createElement('script');
  script1.text = `
    document.querySelector('button').addEventListener('click', (e) => {
      location.hash = "myHash";
    });
  `;
  div.appendChild(script1);

  var async1 = async_test('Case 1: hash changed to content[hash="a-hash-template"]');
  var async2 = async_test('Case 1: hash changed to content[hash="another-hash-template"]');
  var async5 = async_test('Case 1: click over button leads to unmatching route');
  var async6 = async_test('Case 1: reset to the window.location.hash="" state at case 1');

  async1.next = async1.step_func(_ => {
    var hash = "a-hash-template";
    var content = document.querySelector(`${tagContent}[hash="${hash}"]`);
    assert_true(content.hidden);
    var hashAsync = async_test(`Case 1: If change hash to "${hash}" then show its content`);

    var check_hash = hashAsync.step_func((e) => {
      assert_false(content.hidden);
      assert_true(e.newURL.includes(hash));

      // clean the test
      window.removeEventListener('hashchange', check_hash);

      hashAsync.done();
      async1.done();
      async2.next();
    });

    window.addEventListener('hashchange', check_hash);
    window.location.hash = hash;
  });

  async2.next = async2.step_func(_ => {
    var hash = "another-hash-template";
    var content = document.querySelector(`${tagContent}[hash="${hash}"]`);
    assert_true(content.hidden);

    var hashAsync = async_test(`Case 1: If change hash to "${hash}" then show its content`);

    var check_hash = hashAsync.step_func((e) => {
      assert_false(content.hidden);
      assert_true(e.newURL.includes(hash));

      // clean the test
      window.removeEventListener('hashchange', check_hash);

      hashAsync.done();
      async2.done();
      async5.next();
    });

    window.addEventListener('hashchange', check_hash);
    window.location.hash = hash;

  });

  async5.next = async5.step_func(_ => {
    var hash = "myHash";
    var content = document.querySelector(`${tagContent}[hash="${hash}"]`);
    assert_equals(content, null);

    var hashAsync = async_test(`Case 1: If hash changes to an unmatching route throw an error`);

    var check_error = hashAsync.step_func((message) => {
      // clean the test
      assert_equals(message, `Uncaught Error: hash "${hash}" does not match any content`);
      window.location.hash = '';

      hashAsync.done();
      async5.done();
      async6.next();
    });

    onerror = check_error;
    document.querySelector('button').dispatchEvent(new Event('click'));
  });

  async6.next = async6.step_func(_ => {
    var check_hash = async6.step_func((e) => {
      window.removeEventListener('hashchange', check_hash);
      async6.done();
      rc.next();
      document.body.removeChild(div);
    });

    window.addEventListener('hashchange', check_hash);
    window.location.hash = '';
  });

  rc.push(_ => {
    async1.step(_ => {
      document.body.appendChild(div);
      async1.next();
    });
  })

})(window.routeCases);

@@ -794,17 +794,17 @@
 ar async
-5
+3
  = async
@@ -876,17 +876,17 @@
 ar async
-6
+4
  = async
@@ -1142,101 +1142,8 @@
 en);
-%0A    var hashAsync = async_test(%60Case 1: If change hash to %22$%7Bhash%7D%22 then show its content%60);
 %0A%0A  
@@ -1157,33 +1157,30 @@
 heck_hash = 
-h
 as
-hAs
 ync
+1
 .step_func((
@@ -1357,32 +1357,8 @@
 );%0A%0A
-      hashAsync.done();%0A
     
@@ -1692,102 +1692,8 @@
 );%0A%0A
-    var hashAsync = async_test(%60Case 1: If change hash to %22$%7Bhash%7D%22 then show its content%60);%0A%0A
     
@@ -1709,25 +1709,22 @@
 _hash = 
-h
 as
-hAs
 ync
+2
 .step_fu
@@ -1905,32 +1905,8 @@
 );%0A%0A
-      hashAsync.done();%0A
     
@@ -1929,25 +1929,25 @@
 %0A      async
-5
+3
 .next();%0A   
@@ -2055,17 +2055,17 @@
 %0A  async
-5
+3
 .next = 
@@ -2069,17 +2069,17 @@
  = async
-5
+3
 .step_fu
@@ -2227,106 +2227,8 @@
 );%0A%0A
-    var hashAsync = async_test(%60Case 1: If hash changes to an unmatching route throw an error%60);%0A%0A
     
@@ -2245,25 +2245,22 @@
 error = 
-h
 as
-hAs
 ync
+3
 .step_fu
@@ -2436,38 +2436,14 @@
     
-hashAsync.done();%0A      async5
+async3
 .don
@@ -2454,25 +2454,25 @@
 %0A      async
-6
+4
 .next();%0A   
@@ -2590,17 +2590,17 @@
 %0A  async
-6
+4
 .next = 
@@ -2596,33 +2596,33 @@
 nc4.next = async
-6
+4
 .step_func(_ =%3E 
@@ -2649,17 +2649,17 @@
  = async
-6
+4
 .step_fu
@@ -2745,9 +2745,9 @@
 sync
-6
+4
 .don

Remove unnecessary async tests at case 1