-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(rotation): implements rotations #31
- Loading branch information
Showing
9 changed files
with
54 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+669 Bytes
...sformations-rotations-should-rotate-the-symbol-180-degrees-clockwise-1-snap.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+753 Bytes
...sformations-rotations-should-rotate-the-symbol-270-degrees-clockwise-1-snap.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+776 Bytes
...nsformations-rotations-should-rotate-the-symbol-90-degrees-clockwise-1-snap.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
const symbology = require('../../src') | ||
|
||
describe('Symbology Transformations', () => { | ||
describe('rotations', () => { | ||
it('should rotate the symbol 90 degrees clockwise', async () => { | ||
const image = await createImageFile({ | ||
symbology: symbology.Barcode.CODE128, | ||
rotation: 90 | ||
}, 'png', '12345') | ||
|
||
expect(image).toMatchImageSnapshot() | ||
}) | ||
|
||
it('should rotate the symbol 180 degrees clockwise', async () => { | ||
const image = await createImageFile({ | ||
symbology: symbology.Barcode.CODE128, | ||
rotation: 180 | ||
}, 'png', '12345') | ||
|
||
expect(image).toMatchImageSnapshot() | ||
}) | ||
|
||
it('should rotate the symbol 270 degrees clockwise', async () => { | ||
const image = await createImageFile({ | ||
symbology: symbology.Barcode.CODE128, | ||
rotation: 270 | ||
}, 'png', '12345') | ||
|
||
expect(image).toMatchImageSnapshot() | ||
}) | ||
}) | ||
}) |