mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-29 11:21:40 +02:00
Fix code test
This commit is contained in:
@@ -7,6 +7,15 @@
|
||||
<link rel='stylesheet' href='../node_modules/mocha/mocha.css'>
|
||||
<link rel='stylesheet' href='../dist/iD.css'>
|
||||
<!-- <script src='../node_modules/d3/build/d3.js'></script> -->
|
||||
<style type='text/css'>
|
||||
/* apply standalone iD styling when testing */
|
||||
html, body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body style="overflow:scroll">
|
||||
|
||||
@@ -74,7 +74,8 @@ describe('iD.Map', function() {
|
||||
describe('#center', function() {
|
||||
it('gets and sets center', function() {
|
||||
expect(map.center([0, 0])).to.equal(map);
|
||||
expect(map.center()).to.eql([0, 0]);
|
||||
expect(map.center()[0]).to.be.closeTo(0, 1e-6);
|
||||
expect(map.center()[1]).to.be.closeTo(0, 1e-6);
|
||||
expect(map.center([10, 15])).to.equal(map);
|
||||
expect(map.center()[0]).to.be.closeTo(10, 1e-6);
|
||||
expect(map.center()[1]).to.be.closeTo(15, 1e-6);
|
||||
|
||||
Reference in New Issue
Block a user