Skip to content

Commit

Permalink
Fixing #460
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Cox authored and Dan Cox committed Feb 5, 2024
1 parent 955ec4c commit 674d231
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/Story.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ class Story {

/**
* Internal zoom level
* Default is 1 (100%)
*/
#_zoom = 0;
#_zoom = 1;

/**
* Passages
Expand Down
4 changes: 2 additions & 2 deletions test/JSON/JSON.Parse.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('JSON', () => {
expect(s.format).toBe('');
expect(s.creator).toBe(creatorName);
expect(s.creatorVersion).toBe(creatorVersion);
expect(s.zoom).toBe(0);
expect(s.zoom).toBe(1);
expect(Object.keys(s.metadata).length).toBe(0);
});

Expand Down Expand Up @@ -189,7 +189,7 @@ describe('JSON', () => {
expect(r.format).toBe('Snowman');
expect(r.creator).toBe(creatorName);
expect(r.creatorVersion).toBe('2.2.0');
expect(r.zoom).toBe(0);
expect(r.zoom).toBe(1);
expect(r.size()).toBe(1);
});

Expand Down
2 changes: 1 addition & 1 deletion test/Story.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ describe('Story', () => {
expect(result.format).toBe('');
expect(result.creator).toBe(creatorName);
expect(result.creatorVersion).toBe(creatorVersion);
expect(result.zoom).toBe(0);
expect(result.zoom).toBe(1);
expect(Object.keys(result.metadata).length).toBe(0);
});

Expand Down
2 changes: 1 addition & 1 deletion test/TWS/Parse.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ describe('TWSParser', () => {
const contents = fs.readFileSync('test/TWS/TWSParser/noscale.tws', 'binary');
const b = Buffer.from(contents, 'binary');
const r = parseTWS(b);
expect(r.zoom).toBe(0);
expect(r.zoom).toBe(1);
});
});
});
Expand Down
2 changes: 1 addition & 1 deletion test/Twine2HTML/Twine2HTML.Parse.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe('Twine2HTMLParser', () => {
it('Should have empty string as zoom when missing', () => {
const fr = readFileSync('test/Twine2HTML/Twine2HTMLParser/missingZoom.html', 'utf-8');
const tp = parseTwine2HTML(fr);
expect(tp.zoom).toBe(0);
expect(tp.zoom).toBe(1);
});

it('Should not have position if passage does not', () => {
Expand Down

0 comments on commit 674d231

Please sign in to comment.