From 65054249893656e445e296696b93ac28050e9d1c Mon Sep 17 00:00:00 2001 From: Chris Burnell Date: Sun, 11 Aug 2024 04:25:06 +0800 Subject: [PATCH] refactor: tests; error instance checking --- .github/workflows/npm-publish.yml | 3 +- .gitignore | 51 ---- .npmignore | 2 +- .prettierrc | 3 +- index.js => check-invalid-datetimes.js | 0 check-invalid-datetimes.test.js | 73 ++++++ package-lock.json | 329 +++++++++++++++++++++++++ package.json | 6 +- src/checkDateTimes.js | 44 +++- src/formatErrors.js | 2 +- test.js | 67 ----- test/test.html | 14 +- test/test.xml | 8 +- 13 files changed, 461 insertions(+), 141 deletions(-) delete mode 100644 .gitignore rename index.js => check-invalid-datetimes.js (100%) create mode 100644 check-invalid-datetimes.test.js create mode 100644 package-lock.json delete mode 100644 test.js diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 0c159af..71f0c0e 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -16,7 +16,8 @@ jobs: with: node-version: 20 registry-url: https://registry.npmjs.org/ - - run: npm install + - run: npm ci + - run: node --test - if: ${{ github.event.release.tag_name != '' && env.NPM_PUBLISH_TAG != '' }} run: npm publish --provenance --access=public --tag=${{ env.NPM_PUBLISH_TAG }} env: diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 0ba8774..0000000 --- a/.gitignore +++ /dev/null @@ -1,51 +0,0 @@ -# Folder view configuration files -_Store -.DS_Store* -Desktop.ini -Icon - -# Thumbnail cache files -._* -Thumbs.db - -# Files that might appear on external disks -.Spotlight-V100 -.Trashes - -# Packages -*.7z -*.dmg -*.gz -*.iso -*.jar -*.rar -*.tar -*.zip - -# Logs and databases -*.log -*.sql -*.sqlite - -# Eleventy -.env -_site/ - -# Sass -.sass-cache - -# NPM -node_modules/ - -# Lockfiles -package-lock.json -*.lock - -# Git Config -.gitconfig - -# Site Assets -/css -/fonts -/static -/.cache diff --git a/.npmignore b/.npmignore index ac2f70e..09a2e41 100644 --- a/.npmignore +++ b/.npmignore @@ -6,4 +6,4 @@ .prettierrc .prettierignore test -test.js +check-invalid-datetimes.test.js diff --git a/.prettierrc b/.prettierrc index cef22be..7565d91 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,3 +1,4 @@ { - "tabWidth": 4 + "tabWidth": 4, + "trailingComma": "all" } diff --git a/index.js b/check-invalid-datetimes.js similarity index 100% rename from index.js rename to check-invalid-datetimes.js diff --git a/check-invalid-datetimes.test.js b/check-invalid-datetimes.test.js new file mode 100644 index 0000000..5121376 --- /dev/null +++ b/check-invalid-datetimes.test.js @@ -0,0 +1,73 @@ +import assert from "node:assert/strict"; +import { describe, it } from "node:test"; +import { checkInvalidDateTimes } from "./src/checkInvalidDateTimes.js"; + +const options = { + directory: "test", + quiet: true, +}; + +const getErrorInstances = (errors) => { + return errors.flatMap((object) => { + return object.instances; + }); +}; + +describe("check-invalid-datetimes", () => { + it("Should return an array of errors", async () => { + const cli = new checkInvalidDateTimes(); + cli.setOptions(options); + const result = await cli.run(); + + const errorInstances = getErrorInstances(result.errors); + + assert.strictEqual(errorInstances.length, 5); + }); + + it("Should be able to check only specified file types", async () => { + const cli = new checkInvalidDateTimes(); + cli.setOptions(Object.assign({}, options, { fileTypes: "html" })); + const result = await cli.run(); + + const errorInstances = getErrorInstances(result.errors); + + assert.strictEqual(errorInstances.length, 2); + }); + + it("Should return the location of found errors", async () => { + const cli = new checkInvalidDateTimes(); + cli.setOptions(Object.assign({}, options, { fileTypes: "xml" })); + const result = await cli.run(); + + const errorInstances = getErrorInstances(result.errors); + + assert.strictEqual(errorInstances[0].lineNumber, 6); + assert.strictEqual(errorInstances[0].columnNumber, 11); + assert.strictEqual( + errorInstances[0].string, + "Invalid DateTime", + ); + + assert.strictEqual(errorInstances[1].lineNumber, 12); + assert.strictEqual(errorInstances[1].columnNumber, 12); + assert.strictEqual( + errorInstances[1].string, + "Invalid DateTime", + ); + + assert.strictEqual(errorInstances[2].lineNumber, 13); + assert.strictEqual(errorInstances[2].columnNumber, 14); + assert.strictEqual( + errorInstances[2].string, + "Invalid DateTime", + ); + }); + + it("Should return a message summarising the result", async () => { + const cli = new checkInvalidDateTimes(); + cli.setOptions(Object.assign({}, options, { fileTypes: "xml" })); + const result = await cli.run(); + + assert.notStrictEqual(result.message, ""); + }); +}); diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..4ae2190 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,329 @@ +{ + "name": "@chrisburnell/check-invalid-datetimes", + "version": "0.1.1", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@chrisburnell/check-invalid-datetimes", + "version": "0.1.1", + "funding": [ + { + "type": "buymeacoffee", + "url": "https://buymeacoffee.com/chrisburnell" + }, + { + "type": "github", + "url": "https://github.com/sponsors/chrisburnell" + } + ], + "license": "MIT", + "dependencies": { + "chalk": "^5.3.0", + "command-line-args": "^6.0.0", + "fast-glob": "^3.3.2", + "he": "^1.2.0" + }, + "bin": { + "check-invalid-datetimes": "src/cli.js" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/array-back": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-6.2.2.tgz", + "integrity": "sha512-gUAZ7HPyb4SJczXAMUXMGAvI976JoK3qEx9v1FTmeYuJj0IBiaKttG1ydtGKdkfqWkIkouke7nG8ufGy77+Cvw==", + "license": "MIT", + "engines": { + "node": ">=12.17" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/command-line-args": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-6.0.0.tgz", + "integrity": "sha512-zDdHxHzlCp/gA1gy0VtPK3YL0Aob3ijJdwZ7H3HSl55hh8EziLtRlyj/od8EGRJfX8IjussC/mQkScl2Ms5Suw==", + "license": "MIT", + "dependencies": { + "array-back": "^6.2.2", + "find-replace": "^5.0.1", + "lodash.camelcase": "^4.3.0", + "typical": "^7.1.1" + }, + "engines": { + "node": ">=12.20" + } + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-replace": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-5.0.1.tgz", + "integrity": "sha512-o5/Y8HrCNRuFF5rdNTkX8Vhv6kTFTV0t1zIoigwlCdbkA9qaapRzxvWPND2VvlFa9LBI05Q1i8ml/saMqkOJUQ==", + "license": "MIT", + "dependencies": { + "array-back": "^6.2.2" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "license": "MIT", + "bin": { + "he": "bin/he" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", + "license": "MIT" + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", + "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/typical": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/typical/-/typical-7.1.1.tgz", + "integrity": "sha512-T+tKVNs6Wu7IWiAce5BgMd7OZfNYUndHwc5MknN+UHOudi7sGZzuHdCadllRuqJ3fPtgFtIH9+lt9qRv6lmpfA==", + "license": "MIT", + "engines": { + "node": ">=12.17" + } + } + } +} diff --git a/package.json b/package.json index 3f748c8..b74351a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@chrisburnell/check-invalid-datetimes", - "version": "0.1.0", + "version": "0.1.1", "description": "Check HTML and XML files for strings containing \"Invalid DateTime\" from failed/malformed DateTime formatting.", "license": "MIT", "repository": { @@ -37,12 +37,12 @@ "access": "public", "provenance": true }, - "main": "index.js", + "main": "check-invalid-datetimes.js", "bin": { "check-invalid-datetimes": "src/cli.js" }, "scripts": { - "test": "node --test test.js" + "test": "node --test" }, "keywords": [ "cli", diff --git a/src/checkDateTimes.js b/src/checkDateTimes.js index 1bc845d..b359954 100644 --- a/src/checkDateTimes.js +++ b/src/checkDateTimes.js @@ -2,6 +2,36 @@ import fs from "fs"; import he from "he"; import readline from "readline"; +export function hasInvalidDateTime(file, line) { + if (/\.html$/i.test(file)) { + return ( + /]*>(?:(?!<\/time>).)*Invalid DateTime(?:(?!<\/time>).)*<\/time>/.test( + line, + ) || + /]*\bdatetime\s*=\s*"[^"]*Invalid DateTime[^"]*"/.test( + line, + ) + ); + } else if (/\.xml$/i.test(file)) { + return /<(pubDate|lastBuildDate|updated|published)\b[^>]*>(?:(?!<\/\1>).)*Invalid DateTime(?:(?!<\/\1>).)*<\/\1>/.test( + line, + ); + } + return /Invalid DateTime/.test(line); +} + +export function findAllIndexes(string) { + const indexes = []; + let i = string.indexOf("Invalid DateTime"); + + while (i !== -1) { + indexes.push(i); + i = string.indexOf("Invalid DateTime", i + 1); + } + + return indexes; +} + export async function checkDateTimes(files) { const errors = []; @@ -17,12 +47,14 @@ export async function checkDateTimes(files) { let columnNumber = 0; for await (const line of rl) { lineNumber++; - if (line.includes("Invalid DateTime")) { - columnNumber = line.indexOf("Invalid DateTime") + 1; - instances.push({ - lineNumber: lineNumber, - columnNumber: columnNumber, - string: he.decode(line).trim(), + if (hasInvalidDateTime(file, line)) { + findAllIndexes(line).forEach((index) => { + columnNumber = index + 1; + instances.push({ + lineNumber: lineNumber, + columnNumber: columnNumber, + string: he.decode(line).trim(), + }); }); } } diff --git a/src/formatErrors.js b/src/formatErrors.js index 0bb40cd..48ec470 100644 --- a/src/formatErrors.js +++ b/src/formatErrors.js @@ -29,7 +29,7 @@ export function formatErrors(errors, relativeFrom = process.cwd()) { ":" + instance.columnNumber, )} via ${instance.string.replace( - "Invalid DateTime", + /Invalid DateTime/g, chalk.red.bold("Invalid DateTime"), )}`, ), diff --git a/test.js b/test.js deleted file mode 100644 index 98ade2a..0000000 --- a/test.js +++ /dev/null @@ -1,67 +0,0 @@ -import assert from "node:assert"; -import test from "node:test"; -import { checkInvalidDateTimes } from "./src/checkInvalidDateTimes.js"; - -const options = { - directory: "test", - quiet: true, -}; - -const getErrorInstances = (errors) => { - return errors.flatMap((object) => { - return object.instances; - }); -}; - -test("Get number of errors", async () => { - const cli = new checkInvalidDateTimes(); - cli.setOptions(options); - const result = await cli.run(); - - const errorInstances = getErrorInstances(result.errors); - - assert.strictEqual(errorInstances.length, 3); -}); - -test("Get number of HTML errors", async () => { - const cli = new checkInvalidDateTimes(); - cli.setOptions(Object.assign({}, options, { fileTypes: "html" })); - const result = await cli.run(); - - const errorInstances = getErrorInstances(result.errors); - - assert.strictEqual(errorInstances.length, 2); -}); - -test("Get number of XML errors", async () => { - const cli = new checkInvalidDateTimes(); - cli.setOptions(Object.assign({}, options, { fileTypes: "xml" })); - const result = await cli.run(); - - const errorInstances = getErrorInstances(result.errors); - - assert.strictEqual(errorInstances.length, 1); -}); - -test("Get location of errors", async () => { - const cli = new checkInvalidDateTimes(); - cli.setOptions(Object.assign({}, options, { fileTypes: "xml" })); - const result = await cli.run(); - - const errorInstances = getErrorInstances(result.errors); - - assert.strictEqual(errorInstances[0].lineNumber, 11); - assert.strictEqual(errorInstances[0].columnNumber, 12); - assert.strictEqual( - errorInstances[0].string, - "Invalid DateTime", - ); -}); - -test("Check message is not empty", async () => { - const cli = new checkInvalidDateTimes(); - cli.setOptions(Object.assign({}, options, { fileTypes: "xml" })); - const result = await cli.run(); - - assert.notStrictEqual(result.message, ""); -}); diff --git a/test/test.html b/test/test.html index 5c3fea7..9cf3d12 100644 --- a/test/test.html +++ b/test/test.html @@ -1,7 +1,7 @@ - - - -Invalid DateTime - - -Invalid DateTime \ No newline at end of file + + + +

Invalid DateTime

+ + + diff --git a/test/test.xml b/test/test.xml index dc149fd..94b347b 100644 --- a/test/test.xml +++ b/test/test.xml @@ -3,11 +3,13 @@ Example XML https://example.com/ + Invalid DateTime https://example.com/example/ Example Post - - Invalid DateTime + Lorem ipsum dolor sit amet + Invalid DateTime + Invalid DateTime - \ No newline at end of file +