Skip to content

Commit

Permalink
Updating
Browse files Browse the repository at this point in the history
  • Loading branch information
seantomburke committed Nov 8, 2024
1 parent 5e1ee9b commit 740a6c6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 32 deletions.
14 changes: 7 additions & 7 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default [
{
plugins: {
prettier: eslintPluginPrettier,
mocha: eslintPluginMocha
mocha: eslintPluginMocha,
},
languageOptions: {
ecmaVersion: 'latest',
Expand All @@ -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,
},
},
];
25 changes: 0 additions & 25 deletions src/tests/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 740a6c6

Please sign in to comment.