Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Asheem Mamoowala committed Aug 19, 2019
1 parent 12b2db8 commit cd7f5bd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/unit/render/glyph_manager.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ test('GlyphManager does not cache CJK chars that should be rendered locally', (t
t.stub(GlyphManager, 'loadGlyphRange').callsFake((stack, range, urlTemplate, transform, callback) => {
const overlappingGlyphs = {};
const start = range * 256;
const end = start + 256
for (let i=start, j = 0; i < end; i++, j++) {
const end = start + 256;
for (let i = start, j = 0; i < end; i++, j++) {
overlappingGlyphs[i] = glyphs[j];
}
setImmediate(() => callback(null, overlappingGlyphs));
Expand Down Expand Up @@ -136,7 +136,7 @@ test('GlyphManager generates Hiragana PBF locally', (t) => {

test('GlyphManager caches locally generated glyphs', (t) => {
let drawCallCount = 0;
const stub = t.stub(GlyphManager, 'TinySDF').value(class {
t.stub(GlyphManager, 'TinySDF').value(class {
// Return empty 30x30 bitmap (24 fontsize + 3 * 2 buffer)
draw() {
drawCallCount++;
Expand All @@ -151,7 +151,7 @@ test('GlyphManager caches locally generated glyphs', (t) => {
manager.getGlyphs({'Arial Unicode MS': [0x30c6]}, (err, glyphs) => {
t.ifError(err);
t.equal(glyphs['Arial Unicode MS'][0x30c6].metrics.advance, 24);
manager.getGlyphs({'Arial Unicode MS': [0x30c6]}, (err, glyphs) => {
manager.getGlyphs({'Arial Unicode MS': [0x30c6]}, () => {
t.equal(drawCallCount, 1);
t.end();
});
Expand Down

0 comments on commit cd7f5bd

Please sign in to comment.