From 0b4da3b47c76a43625bc9aa47bd16f0df0ccfed7 Mon Sep 17 00:00:00 2001 From: ZJ van de Weg Date: Sat, 23 Sep 2023 09:30:04 -0700 Subject: [PATCH] tests: Remove title test --- .github/workflows/test.yml | 3 --- test/title.spec.js | 28 ---------------------------- 2 files changed, 31 deletions(-) delete mode 100644 test/title.spec.js diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e043e620ad..fe0a6bd5de 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,9 +25,6 @@ jobs: - name: Build the forge run: npm run build working-directory: 'website' - - name: Test the website - run: npm run test - working-directory: 'website' - uses: untitaker/hyperlink@0.1.31 with: args: website/_site/ --check-anchors --sources website/src diff --git a/test/title.spec.js b/test/title.spec.js deleted file mode 100644 index c1990877ad..0000000000 --- a/test/title.spec.js +++ /dev/null @@ -1,28 +0,0 @@ -const assert = require('assert'); -const fs = require('fs'); -const path = require('path'); - -describe("Page titles", async function() { - it("displays the homepage title", async function() { - const data = fs.readFileSync(path.resolve(__dirname, "../_site/index.html"), 'utf8'); - - const xpath = require('xpath'); - const dom = require('@xmldom/xmldom').DOMParser; - - const doc = new dom({ - locator: {}, - errorHandler: { - warning: function (w) { }, - error: function (e) { }, - fatalError: function (e) { - console.error(e) - throw e - } - } - }).parseFromString(data); - - var nodes = xpath.select("//title", doc) - - assert.equal(nodes[0].firstChild.data, "FlowFuse • Accelerate Digital Transformation with FlowFuse and Node-RED") - }) -})