Merge pull request #6468 from fredj/rm_console.assert

Remove console.assert in ol.structs.PriorityQueue tests
This commit is contained in:
Frédéric Junod
2017-02-08 13:59:33 +01:00
committed by GitHub
2 changed files with 2 additions and 21 deletions

View File

@@ -89,15 +89,6 @@
"openlayers-internal"
],
"rules": {
"no-console": [
2,
{
"allow": [
"assert",
"warn"
]
}
],
"no-constant-condition": 0,
"openlayers-internal/enum": 2,
"openlayers-internal/no-duplicate-requires": 2,

View File

@@ -11,19 +11,9 @@ describe('ol.structs.PriorityQueue', function() {
describe('when empty', function() {
var pq, origAssert;
var pq;
beforeEach(function() {
origAssert = console.assert;
console.assert = function(assertion, message) {
if (!assertion) {
throw new Error(message);
}
};
pq = new ol.structs.PriorityQueue(
identity, identity);
});
afterEach(function() {
console.assert = origAssert;
pq = new ol.structs.PriorityQueue(identity, identity);
});
it('is empty', function() {