text: "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  const ava_1 = require("ava");
  const src_1 = require("../src");
  ava_1.default('title', (t) => {
      const doc1 = src_1.createHTMLDocument('test', 'http://localhost/');
      const doc2 = src_1.createHTMLDocument('<title></title>', 'http://localhost/');
      const doc3 = src_1.createHTMLDocument('<title>test</title>', 'http://localhost/');
      t.is(doc1.title, '');
      t.is(doc2.title, '');
      t.is(doc3.title, 'test');
  });
  ava_1.default('querySelectorAll', (t) => {
      const doc = src_1.createHTMLDocument('<div id="d1">div1</div><div id="d2">div2</div>', 'http://localhost/');
      t.is(doc.querySelectorAll('div').length, 2);
      t.is(doc.querySelectorAll('#d1').length, 1);
      t.is(doc.querySelectorAll('#d2').length, 1);
      t.is(doc.querySelectorAll('#d1')[0].textContent, 'div1');
      t.is(doc.querySelectorAll('#d2')[0].textContent, 'div2');
      t.is(doc.querySelectorAll('div')[0], doc.querySelectorAll('#d1')[0]);
      t.is(doc.querySelectorAll('div')[1], doc.querySelectorAll('#d2')[0]);
  });
  ava_1.default('querySelector', (t) => {
      var _a;
      const doc = src_1.createHTMLDocument('<div>div1</div>', 'http://localhost/');
      t.is((_a = doc.querySelector('div')) === null || _a === void 0 ? void 0 : _a.textContent, 'div1');
      t.is(doc.querySelector('not-div'), null);
  });
  