Merge pull request #15716 from overleaf/bg-eslint-console-log-in-web-tests

add console.log rule for tests in web eslintrc

GitOrigin-RevId: 166135e379309870fa4fe2d1797cb4c93cf2d877
This commit is contained in:
Brian Gough 2023-11-10 13:40:13 +00:00 committed by Copybot
parent 9ce9b2c937
commit 26db8ffa69
4 changed files with 5 additions and 5 deletions

View file

@ -299,7 +299,9 @@
"**/app/**/*.{js,cjs,mjs}", "app.js", "modules/*/*.js",
// Frontend: Prefer debugConsole over bare console
// Docs: https://manual.dev-overleaf.com/development/code/logging/#frontend
"**/frontend/**/*.{js,jsx,ts,tsx}"
"**/frontend/**/*.{js,jsx,ts,tsx}",
// Tests
"**/test/**/*.{js,cjs,mjs,jsx,ts,tsx}"
],
"excludedFiles": [
// Allow console logs in scripts

View file

@ -1,3 +1,4 @@
/* eslint-disable no-console */
// silence settings module
console.log = function () {}
const Settings = require('@overleaf/settings')

View file

@ -118,10 +118,8 @@ describe('ConvertArchivedState', function () {
beforeEach(function (done) {
exec(
'CONNECT_DELAY=1 node scripts/convert_archived_state.js FIRST,SECOND',
(error, stdout, stderr) => {
error => {
if (error) {
console.log(stdout)
console.error(stderr)
return done(error)
}
done()

View file

@ -186,7 +186,6 @@ describe('SAMLIdentityManager', function () {
error = e
} finally {
expect(error).to.exist
console.log(error)
expect(error.message).to.contain(
'missing data when linking institution SSO'
)