function select(selector, opt_attribute) {
      const element = doc.querySelector(selector);
      assert(element, "Expected to find: " + selector);
      if (opt_attribute) {
        return element.getAttribute(opt_attribute);
      }
      return element.textContent;
    }
These tests kind of suck and they are kind of useful.

They suck, because they need to be changed when the hardcoded post changes.
They are useful because I tend to break the things they test all the time.