1 const assert = require('assert');
3 describe('Reverse Only', function () {
6 // eslint-disable-next-line mocha/no-setup-in-describe
7 if (!process.env.REVERSE_ONLY) return;
9 describe('Redirect default pages', function () {
10 before(async function () {
11 page = await browser.newPage();
12 await page.goto('http://localhost:9999/search.html');
15 after(async function () {
19 it('should redirect to /reverse', async function () {
20 // await page.waitForSelector('footer');
22 let current_url = new URL(await page.url());
23 assert.deepStrictEqual(current_url.pathname, '/reverse.html');
26 it('no navigation link', async function () {
27 let nav_item = await page.$('nav ul li a[href="search.html"]');
28 assert.equal(nav_item, null);