chai-leaflet
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -6,21 +6,16 @@ /** | ||
*/ | ||
(function (chaiLeaflet) { | ||
'use strict'; | ||
(function (factory, window) { | ||
// Module systems magic dance. | ||
if (typeof require === 'function' && typeof exports === 'object' && typeof module === 'object') { | ||
// NodeJS | ||
module.exports = chaiLeaflet; | ||
} else if (typeof define === 'function' && define.amd) { | ||
// AMD | ||
define(function () { | ||
return chaiLeaflet; | ||
}); | ||
} else { | ||
// Other environment (usually <script> tag): plug in to global chai instance directly. | ||
chai.use(chaiLeaflet); | ||
// define an AMD module that relies on 'chai' | ||
if (typeof define === 'function' && define.amd) { | ||
define(['chai'], factory); | ||
// define a Common JS module that relies on 'chai' | ||
} else if (typeof exports === 'object') { | ||
module.exports = factory(require('chai')); | ||
} | ||
}(function chaiLeaflet(chai) { | ||
'use strict'; | ||
if (typeof window !== 'undefined' && typeof chai !== 'undefined') { | ||
chai.use(factory); | ||
} | ||
}(function (chai) { | ||
var Assertion = chai.Assertion; | ||
@@ -85,3 +80,2 @@ | ||
/* jshint validthis:true */ | ||
new Assertion( | ||
@@ -143,2 +137,5 @@ this._obj, | ||
}); | ||
})); | ||
return chai; | ||
}, window)); |
{ | ||
"name": "chai-leaflet", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "Chai assertions to use with Leaflet map apps", | ||
"main": "chai-leaflet.js", | ||
"scripts": { | ||
"test": "mocha-phantomjs test/index.html" | ||
"test": "npm run lint && npm run test-browser", | ||
"lint": "eslint chai-leaflet.js", | ||
"test-node": "mocha test/test.js", | ||
"test-browser": "mocha-phantomjs test/index.html", | ||
"release": "mversion patch -m" | ||
}, | ||
@@ -24,6 +28,9 @@ "repository": { | ||
"devDependencies": { | ||
"chai": "~1.8.1", | ||
"eslint": "^0.15.0", | ||
"leaflet": "~0.7.0", | ||
"chai": "~1.8.1", | ||
"mocha-phantomjs": "~3.1.5", | ||
"mocha": "~1.14.0" | ||
"mocha": "^2.2.1", | ||
"mocha-phantomjs": "^3.5.3", | ||
"mversion": "^1.10.0", | ||
"phantomjs": "^1.9.16" | ||
}, | ||
@@ -30,0 +37,0 @@ "peerDependencies": { |
'use strict'; | ||
if (typeof window === 'undefined') { | ||
try { | ||
var L = require('leaflet-headless'); | ||
} catch(e) { | ||
throw 'Package leaflet-headless needs to be installed: npm install leaflet-headless'; | ||
} | ||
var chai = require('chai'); | ||
require('../chai-leaflet.js'); | ||
} | ||
describe('chai-leaflet', function () { | ||
@@ -150,2 +162,2 @@ chai.should(); | ||
}); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12233
11
247
7