Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
expect-maptalks
Advanced tools
A plugin of expect.js(https://github.com/Automattic/expect.js) for maptalks with assertions for Coordinate/GeoJSON/Layer
A plugin of expect.js(https://github.com/Automattic/expect.js) for maptalks with assertions for Coordinate/GeoJSON/Layer
npm install expect-maptalks --save-dev
Install karma-expect-maptalks
npm install karma-expect-maptalks --save-dev
In karma.conf.js, Attention: always declare expect-maptalks behind expect
frameworks: [
'mocha',
'expect',
'expect-maptalks'
],
plugins: [
'karma-expect',
'karma-expect-maptalks'
],
approx: asserts that the value is approximately equal or not
expect(1.000001).to.be.approx(1);
expect(1.001).to.be.approx(1, 1E-2);
closeTo: asserts that whether the coordinate is closeTo another (approx with a delta of 1E-6)
expect([1, 1]).to.be.closeTo([1 + 1E-7, 1 - 1E-7]);
expect({x : 1, y : 1}).to.be.closeTo([1 + 1E-7, 1 - 1E-7]);
eqlGeoJSON: asserts that whether a GeoJSON object is equal with another (true if the coordinates are closeTo another's)
//true
expect({ "type": "Point", "coordinates": [0.0, 0.0] })
.to.be.eqlGeoJSON({ "type": "Point", "coordinates": [0.000001, 0.000001] });
painted: asserts the given layer is painted in the center with a offset.
var v = new maptalks.VectorLayer('v').addGeometries(geos).addTo(map);
//asserts layer is painted in the center
expect(v).to.be.painted();
//whether the layer is painted with an offset {x:5, y:3} from the center.
//a negative x to the left and a positive to the right.
//a negative y to the top and a positive to the bottom.
expect(v).to.be.painted(5, 3);
//assert the point's color is [255, 255, 255]
expect(v).to.be.painted(5, 3, [255, 255, 255]);
FAQs
A plugin of expect.js(https://github.com/Automattic/expect.js) for maptalks with assertions for Coordinate/GeoJSON/Layer
We found that expect-maptalks demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.