Check for forgotten console and debugger statements
This commit is contained in:
+7
-1
@@ -13,5 +13,11 @@ module.exports = {
|
|||||||
"no-unused-vars": "off",
|
"no-unused-vars": "off",
|
||||||
"no-trailing-spaces": "off",
|
"no-trailing-spaces": "off",
|
||||||
"block-spacing": "off",
|
"block-spacing": "off",
|
||||||
|
|
||||||
|
// Since linting is done at the end of the process and doesn't stop us
|
||||||
|
// from running tests, it makes sense to fail if debugger statements
|
||||||
|
// or console references are present.
|
||||||
|
"no-debugger": "error",
|
||||||
|
"no-console": "error",
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|||||||
@@ -2316,6 +2316,7 @@ describe("Env integration", function() {
|
|||||||
expect(result.deprecationWarnings).toEqual([
|
expect(result.deprecationWarnings).toEqual([
|
||||||
jasmine.objectContaining({ message: 'top level deprecation' })
|
jasmine.objectContaining({ message: 'top level deprecation' })
|
||||||
]);
|
]);
|
||||||
|
/* eslint-disable-next-line no-console */
|
||||||
expect(console.error).toHaveBeenCalledWith('DEPRECATION: top level deprecation');
|
expect(console.error).toHaveBeenCalledWith('DEPRECATION: top level deprecation');
|
||||||
|
|
||||||
expect(reporter.suiteDone).toHaveBeenCalledWith(jasmine.objectContaining({
|
expect(reporter.suiteDone).toHaveBeenCalledWith(jasmine.objectContaining({
|
||||||
@@ -2324,6 +2325,7 @@ describe("Env integration", function() {
|
|||||||
jasmine.objectContaining({ message: 'suite level deprecation' })
|
jasmine.objectContaining({ message: 'suite level deprecation' })
|
||||||
]
|
]
|
||||||
}));
|
}));
|
||||||
|
/* eslint-disable-next-line no-console */
|
||||||
expect(console.error).toHaveBeenCalledWith('DEPRECATION: suite level deprecation (in suite: suite)');
|
expect(console.error).toHaveBeenCalledWith('DEPRECATION: suite level deprecation (in suite: suite)');
|
||||||
|
|
||||||
expect(reporter.specDone).toHaveBeenCalledWith(jasmine.objectContaining({
|
expect(reporter.specDone).toHaveBeenCalledWith(jasmine.objectContaining({
|
||||||
@@ -2332,6 +2334,7 @@ describe("Env integration", function() {
|
|||||||
jasmine.objectContaining({ message: 'spec level deprecation' })
|
jasmine.objectContaining({ message: 'spec level deprecation' })
|
||||||
]
|
]
|
||||||
}));
|
}));
|
||||||
|
/* eslint-disable-next-line no-console */
|
||||||
expect(console.error).toHaveBeenCalledWith('DEPRECATION: spec level deprecation (in spec: suite spec)');
|
expect(console.error).toHaveBeenCalledWith('DEPRECATION: spec level deprecation (in spec: suite spec)');
|
||||||
|
|
||||||
done();
|
done();
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ describe("matchersUtil", function() {
|
|||||||
|
|
||||||
// Be thorough but very slow when specified (usually on CI).
|
// Be thorough but very slow when specified (usually on CI).
|
||||||
if (process.env.JASMINE_LONG_PROPERTY_TESTS) {
|
if (process.env.JASMINE_LONG_PROPERTY_TESTS) {
|
||||||
|
/* eslint-disable-next-line no-console */
|
||||||
console.log(
|
console.log(
|
||||||
'Using',
|
'Using',
|
||||||
many,
|
many,
|
||||||
|
|||||||
@@ -104,6 +104,7 @@ describe('HtmlReporter', function() {
|
|||||||
passedExpectations: [],
|
passedExpectations: [],
|
||||||
failedExpectations: []
|
failedExpectations: []
|
||||||
});
|
});
|
||||||
|
/* eslint-disable-next-line no-console */
|
||||||
expect(console.warn).toHaveBeenCalledWith(
|
expect(console.warn).toHaveBeenCalledWith(
|
||||||
"Spec 'Some Name' has no expectations."
|
"Spec 'Some Name' has no expectations."
|
||||||
);
|
);
|
||||||
@@ -118,6 +119,7 @@ describe('HtmlReporter', function() {
|
|||||||
passedExpectations: [],
|
passedExpectations: [],
|
||||||
failedExpectations: []
|
failedExpectations: []
|
||||||
});
|
});
|
||||||
|
/* eslint-disable-next-line no-console */
|
||||||
expect(console.error).toHaveBeenCalledWith(
|
expect(console.error).toHaveBeenCalledWith(
|
||||||
"Spec 'Some Name' has no expectations."
|
"Spec 'Some Name' has no expectations."
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user