From 740a6c6e30b65129cb26a7bc3b4999ec0e9efe87 Mon Sep 17 00:00:00 2001 From: Sean Thomas Burke Date: Thu, 7 Nov 2024 22:26:32 -0800 Subject: [PATCH] Updating --- eslint.config.mjs | 14 +++++++------- src/tests/test.js | 25 ------------------------- 2 files changed, 7 insertions(+), 32 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index ba9af49..a69943c 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -9,7 +9,7 @@ export default [ { plugins: { prettier: eslintPluginPrettier, - mocha: eslintPluginMocha + mocha: eslintPluginMocha, }, languageOptions: { ecmaVersion: 'latest', @@ -24,15 +24,15 @@ export default [ before: 'readonly', after: 'readonly', beforeEach: 'readonly', - afterEach: 'readonly' - } + afterEach: 'readonly', + }, }, rules: { 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 'prettier/prettier': 'error', ...prettier.rules, - ...eslintPluginMocha.configs.recommended.rules - } - } -]; + ...eslintPluginMocha.configs.recommended.rules, + }, + }, +]; diff --git a/src/tests/test.js b/src/tests/test.js index 51308de..f7c6fb8 100644 --- a/src/tests/test.js +++ b/src/tests/test.js @@ -210,31 +210,6 @@ describe('Sitemapper', function () { }); }); - // foo.com added HTTPS so this test breaks. TODO: find an insecure site to test with - it.skip('https://foo.com/sitemap.xml should allow insecure request', function (done) { - this.timeout(30000); - const url = 'https://foo.com/sitemap.xml'; - sitemapper.timeout = 10000; - sitemapper.rejectUnauthorized = true; - sitemapper - .fetch(url) - .then((data) => { - data.sites.should.be.Array; - data.errors.should.be.Array; - data.errors.should.containEql({ - type: 'RequestError', - message: 'Error occurred: RequestError', - url: 'https://foo.com/sitemap.xml', - retries: 0, - }); - done(); - }) - .catch((error) => { - console.error('Test failed'); - done(error); - }); - }); - it('https://foo.com/sitemap.xml should not allow insecure request', function (done) { this.timeout(30000); const url = 'https://foo.com/sitemap.xml';