Merge pull request #6468 from fredj/rm_console.assert
Remove console.assert in ol.structs.PriorityQueue tests
This commit is contained in:
@@ -89,15 +89,6 @@
|
|||||||
"openlayers-internal"
|
"openlayers-internal"
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"no-console": [
|
|
||||||
2,
|
|
||||||
{
|
|
||||||
"allow": [
|
|
||||||
"assert",
|
|
||||||
"warn"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"no-constant-condition": 0,
|
"no-constant-condition": 0,
|
||||||
"openlayers-internal/enum": 2,
|
"openlayers-internal/enum": 2,
|
||||||
"openlayers-internal/no-duplicate-requires": 2,
|
"openlayers-internal/no-duplicate-requires": 2,
|
||||||
|
|||||||
@@ -11,19 +11,9 @@ describe('ol.structs.PriorityQueue', function() {
|
|||||||
|
|
||||||
describe('when empty', function() {
|
describe('when empty', function() {
|
||||||
|
|
||||||
var pq, origAssert;
|
var pq;
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
origAssert = console.assert;
|
pq = new ol.structs.PriorityQueue(identity, identity);
|
||||||
console.assert = function(assertion, message) {
|
|
||||||
if (!assertion) {
|
|
||||||
throw new Error(message);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
pq = new ol.structs.PriorityQueue(
|
|
||||||
identity, identity);
|
|
||||||
});
|
|
||||||
afterEach(function() {
|
|
||||||
console.assert = origAssert;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('is empty', function() {
|
it('is empty', function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user