Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add snapshot testing * Add TravisCI
- Loading branch information
Showing
12 changed files
with
1,090 additions
and
148 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
language: node_js | ||
node_js: | ||
- '7' | ||
- '6' | ||
|
||
matrix: | ||
fast_finish: true | ||
|
||
cache: | ||
yarn: true | ||
directories: | ||
- node_modules | ||
|
||
install: yarn | ||
|
||
script: yarn test |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
modulePathIgnorePatterns: ['/node_modules/'], | ||
moduleDirectories: ['packages', 'node_modules'], | ||
testRegex: '/packages/.*?(Spec)\\.js$', | ||
}; |
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
305 changes: 305 additions & 0 deletions
305
packages/react-pdf/specs/__snapshots__/pageSpec.js.snap
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,305 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`<Page /> Should render A4 blank portrait page by default 1`] = ` | ||
"%PDF-1.7 | ||
%���� | ||
1 0 obj | ||
<< | ||
/Type /Font | ||
/Subtype /Type1 | ||
/Name /F1 | ||
/BaseFont /Helvetica | ||
>> | ||
endobj | ||
2 0 obj | ||
<< | ||
/Type /Catalog | ||
/Pages 6 0 R | ||
>> | ||
endobj | ||
6 0 obj | ||
<< | ||
/Type /Pages | ||
/Kids [3 0 R] | ||
/Count 1 | ||
>> | ||
endobj | ||
3 0 obj | ||
<< | ||
/Type /Page | ||
/Parent 6 0 R | ||
/Contents [7 0 R 5 0 R ] | ||
/Resources 4 0 R | ||
/MediaBox [0 0 595.280029296875 841.8900146484375] | ||
>> | ||
endobj | ||
7 0 obj | ||
<< | ||
/Length 16 | ||
>> | ||
stream | ||
/DeviceRGB cs | ||
endstream | ||
endobj | ||
5 0 obj | ||
<< | ||
/Length 31 | ||
>> | ||
stream | ||
1 0 0 -1 0 841.8900146484375 cm | ||
endstream | ||
endobj | ||
4 0 obj | ||
<< | ||
/ProcSet [/PDF/Text] | ||
/Font <</F1 1 0 R>> | ||
>> | ||
endobj | ||
xref | ||
0 6 | ||
0000000000 65535 f | ||
0000000015 00000 n | ||
0000000095 00000 n | ||
0000000201 00000 n | ||
0000000341 00000 n | ||
0000000144 00000 n | ||
trailer | ||
<< | ||
/Size 5 | ||
/Root 2 0 R | ||
>> | ||
startxref | ||
403 | ||
%%EOF" | ||
`; | ||
|
||
exports[`<Page /> Should render given background color 1`] = ` | ||
"%PDF-1.7 | ||
%���� | ||
15 0 obj | ||
<< | ||
/Type /Font | ||
/Subtype /Type1 | ||
/Name /F1 | ||
/BaseFont /Helvetica | ||
>> | ||
endobj | ||
16 0 obj | ||
<< | ||
/Type /Catalog | ||
/Pages 20 0 R | ||
>> | ||
endobj | ||
20 0 obj | ||
<< | ||
/Type /Pages | ||
/Kids [17 0 R] | ||
/Count 1 | ||
>> | ||
endobj | ||
17 0 obj | ||
<< | ||
/Type /Page | ||
/Parent 20 0 R | ||
/Contents [21 0 R 19 0 R ] | ||
/Resources 18 0 R | ||
/MediaBox [0 0 595.280029296875 841.8900146484375] | ||
>> | ||
endobj | ||
21 0 obj | ||
<< | ||
/Length 102 | ||
>> | ||
stream | ||
/DeviceRGB cs | ||
1 0.38823529411764707 0.2784313725490196 scn | ||
0 0 595.280029296875 841.8900146484375 re | ||
f | ||
endstream | ||
endobj | ||
19 0 obj | ||
<< | ||
/Length 31 | ||
>> | ||
stream | ||
1 0 0 -1 0 841.8900146484375 cm | ||
endstream | ||
endobj | ||
18 0 obj | ||
<< | ||
/ProcSet [/PDF/Text] | ||
/Font <</F1 15 0 R>> | ||
>> | ||
endobj | ||
xref | ||
0 6 | ||
0000000000 65535 f | ||
0000000015 00000 n | ||
0000000096 00000 n | ||
0000000206 00000 n | ||
0000000351 00000 n | ||
0000000147 00000 n | ||
trailer | ||
<< | ||
/Size 5 | ||
/Root 16 0 R | ||
>> | ||
startxref | ||
415 | ||
%%EOF" | ||
`; | ||
|
||
exports[`<Page /> Should render given size 1`] = ` | ||
"%PDF-1.7 | ||
%���� | ||
8 0 obj | ||
<< | ||
/Type /Font | ||
/Subtype /Type1 | ||
/Name /F1 | ||
/BaseFont /Helvetica | ||
>> | ||
endobj | ||
9 0 obj | ||
<< | ||
/Type /Catalog | ||
/Pages 13 0 R | ||
>> | ||
endobj | ||
13 0 obj | ||
<< | ||
/Type /Pages | ||
/Kids [10 0 R] | ||
/Count 1 | ||
>> | ||
endobj | ||
10 0 obj | ||
<< | ||
/Type /Page | ||
/Parent 13 0 R | ||
/Contents [14 0 R 12 0 R ] | ||
/Resources 11 0 R | ||
/MediaBox [0 0 2383.93994140625 3370.389892578125] | ||
>> | ||
endobj | ||
14 0 obj | ||
<< | ||
/Length 16 | ||
>> | ||
stream | ||
/DeviceRGB cs | ||
endstream | ||
endobj | ||
12 0 obj | ||
<< | ||
/Length 31 | ||
>> | ||
stream | ||
1 0 0 -1 0 3370.389892578125 cm | ||
endstream | ||
endobj | ||
11 0 obj | ||
<< | ||
/ProcSet [/PDF/Text] | ||
/Font <</F1 8 0 R>> | ||
>> | ||
endobj | ||
xref | ||
0 6 | ||
0000000000 65535 f | ||
0000000015 00000 n | ||
0000000095 00000 n | ||
0000000204 00000 n | ||
0000000349 00000 n | ||
0000000145 00000 n | ||
trailer | ||
<< | ||
/Size 5 | ||
/Root 9 0 R | ||
>> | ||
startxref | ||
412 | ||
%%EOF" | ||
`; | ||
|
||
exports[`<Page /> Should render landscape page 1`] = ` | ||
"%PDF-1.7 | ||
%���� | ||
22 0 obj | ||
<< | ||
/Type /Font | ||
/Subtype /Type1 | ||
/Name /F1 | ||
/BaseFont /Helvetica | ||
>> | ||
endobj | ||
23 0 obj | ||
<< | ||
/Type /Catalog | ||
/Pages 27 0 R | ||
>> | ||
endobj | ||
27 0 obj | ||
<< | ||
/Type /Pages | ||
/Kids [24 0 R] | ||
/Count 1 | ||
>> | ||
endobj | ||
24 0 obj | ||
<< | ||
/Type /Page | ||
/Parent 27 0 R | ||
/Contents [28 0 R 26 0 R ] | ||
/Resources 25 0 R | ||
/MediaBox [0 0 841.8900146484375 595.280029296875] | ||
>> | ||
endobj | ||
28 0 obj | ||
<< | ||
/Length 16 | ||
>> | ||
stream | ||
/DeviceRGB cs | ||
endstream | ||
endobj | ||
26 0 obj | ||
<< | ||
/Length 30 | ||
>> | ||
stream | ||
1 0 0 -1 0 595.280029296875 cm | ||
endstream | ||
endobj | ||
25 0 obj | ||
<< | ||
/ProcSet [/PDF/Text] | ||
/Font <</F1 22 0 R>> | ||
>> | ||
endobj | ||
xref | ||
0 6 | ||
0000000000 65535 f | ||
0000000015 00000 n | ||
0000000096 00000 n | ||
0000000206 00000 n | ||
0000000351 00000 n | ||
0000000147 00000 n | ||
trailer | ||
<< | ||
/Size 5 | ||
/Root 23 0 R | ||
>> | ||
startxref | ||
415 | ||
%%EOF" | ||
`; |
Oops, something went wrong.